Last post Nov 10, 2009 02:53 PM by renitdaniel
Nov 09, 2009 11:59 AM|renitdaniel|LINK
I am trying to parse through an excel sheet and fill in the data from it into a data set and then work with the extracted data. Presently im targeting the coordinates that the data is filled in to in the excel sheet and then extracting the data by code.
For eg. if cells A1 - G14, I target them and upload the data in to the data set.
How can i set it to where it can check to find the first row with data on the spreadsheet to the last row with data and then extract that? Eg, if there is no data from A1 to A4 and the header starts at A5. How can i set it to automatically detect that the
data starts at A5 without having to specifically mention in code that it starts from there.
Nov 09, 2009 01:59 PM|DarrellNorton|LINK
Have you tried Select * From [WorksheetName$] ? That should return all data in the Excel for the given worksheet.
You can select that data into a dataset so you can work with it however you want:
Nov 10, 2009 02:53 PM|renitdaniel|LINK
Yes i have, but say I want to push into the datatable only data from Rows A 10 to whatever is the last row number that contains data. How do I do that?
The last row that will contain data varies from spreadsheet to spreadsheet, so how can i make it dynamic to where it has a fixed starting row, but finds out the last row that has data, and use it as the last row that has data?