c# Getting Data From Excel
-
Hi All, This is my first post in this forum that is full of excellent information I'm so glad I found it. I have a c# program I'm working on it opens an excell file and displayes the results in a DataGrid at the moment I have it selecting the cell with the code below. //Set excel sheet range exr.SheetRange = "A1:C5"; What I'm trying to make it do is select the data from cells M3, M4, E5, G5, H5, R5 then go to cell G7 and read till the last empty cell to the right of G7 then read down from G7 to the last empty cell. Any one know how to do this?
-
Hi All, This is my first post in this forum that is full of excellent information I'm so glad I found it. I have a c# program I'm working on it opens an excell file and displayes the results in a DataGrid at the moment I have it selecting the cell with the code below. //Set excel sheet range exr.SheetRange = "A1:C5"; What I'm trying to make it do is select the data from cells M3, M4, E5, G5, H5, R5 then go to cell G7 and read till the last empty cell to the right of G7 then read down from G7 to the last empty cell. Any one know how to do this?
Hello Not much to say but the idea is: your problem can be solved with 2 loops (on rows and columns) try it and reply if not succeeded. Hope u be happy.
Syed Shahid Hussain
-
Hi All, This is my first post in this forum that is full of excellent information I'm so glad I found it. I have a c# program I'm working on it opens an excell file and displayes the results in a DataGrid at the moment I have it selecting the cell with the code below. //Set excel sheet range exr.SheetRange = "A1:C5"; What I'm trying to make it do is select the data from cells M3, M4, E5, G5, H5, R5 then go to cell G7 and read till the last empty cell to the right of G7 then read down from G7 to the last empty cell. Any one know how to do this?