Last post Jun 06, 2013 11:46 AM by Lannie
Jun 03, 2013 06:34 AM|mehta.rahulit|LINK
I know approaches like oledb, Excel object model.
Wanted to know whats the best approach
Jun 03, 2013 06:45 AM|urenjoy|LINK
You might want to see following:
Jun 03, 2013 07:23 AM|tarunesh_|LINK
best i guess would be take all data in datatable or dataset
using DataReader after that start exploring whatever you wish to do.
Jun 03, 2013 08:59 AM|mehta.rahulit|LINK
So should i conclude that OLEDB is best way?
Jun 03, 2013 11:03 PM|Lannie|LINK
OLEDB is fine way to go, but sometimes you get unexpected results and may have to modify (prepare) your data on the Excel side or handle a data transformation on the .NET side. The main issue is what you see in a spreadsheet is a FORMAT and not what Excel
may be storing in the background and exports to OLEDB. Search this Forum for Excel and OLEDB keywords and you will get an understanding of some recurring issues.
Jun 04, 2013 05:28 AM|mehta.rahulit|LINK
OLEDB is fine way to go, but sometimes you get unexpected results and may have to modify (prepare) your data on the Excel side
-- can you highlight more or share links?
Jun 06, 2013 11:46 AM|Lannie|LINK
You format a DATE in Excel like '01 Jan 2013' and in the background, Excel stores it as integer, and you might get the integer instead of the formatted date. similar things can happen with other "formatted" excel cells, like NUMBER formatting. When/if
these happen you have to handle it on the excel side or transform it on the .NET side before putting into a data grid.