I’m trying to read an excel file from C# using COM, and can get it opened and loaded just fine. However, I don’t want to use all of the data on the sheet (it expands monthly), just a certain subset that starts below the top of the sheet (row 3 for headers, row 4 for data) and goes to the end. I can currently get a range representing the entire set of data as Excel.Worksheet.UsedRange, but next I need to either manipulate this down to the desired range, or (preferably) find the end point to pass into another range for my actual data retrieval. Can Anyone tell me how to do either of these? Thanks.
I’m trying to read an excel file from C# using COM, and can get
Share
I am not sure what you are trying to do. But here are some examples.
Assume I have the following range:
To Move your Range Down by
n-number of row:To Move your bottom row up
I assume you can figure out how to move it side to side.
get_Offset()will move the whole range over and then you need to resize the range.EDIT: Now that i know what you want.
To select the Last Cell:
Now you can use your own starting point like so: