Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

Commented Unassigned: Wrong calculation of offset after cells are merged [22317]

$
0
0
Hi Sebastian,

Please take a look at attached screens to clarify.
I try to merge 2 cells making a loop for say 60 rows and 4 columns. I always start from my reference cell (say "B5") and make a step (each time 2 rows) to receive new starting cell (say "B7", "B9" and so on) for next merge operation (say "B5:B6", "B7:B8" and so on). Unfortunatelly calculated cell starting address is wrong ("B8" instead of "B7").

What am I missing here?

Comments: You may face a bad trap here and work against the wrong indexer. (Dont use the underline "_" at the end please.) Please try var test = workSheet.get_Range("B5").get_Offset(2, 0).Address; (This is a Visual Basic syntax problem - not easy to explain...) *Sebastian

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>