المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Reading Data from Excel spreadsheet, unusual problem



C# Programming
04-23-2009, 12:22 PM
Hi

Wonder if anyone out there can help me.

I have been working on retrieving data from xls files using ole and have had no problems until i received a file that is causing me considerable greif.

The file in question is 26k in size and is a simple headed workbook with 2 pages.

When I connect to the file and try to retreive schema info (using schema = GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, "TABLE" })) no table rows (pages) are found (ie schema.Rows is null).

If I open the file in Excel and click on the save button (without making any changes) the file grows by 10k in size and the data can then be retrieved without any problems!!???

Has anyone out there ever experienced an issue of this nature and if so, could you possibly explain what is making this happen.

Many thanks in advance to anyone who can help,
Steve http://www.barakasoft.com/script/Forums/Images/smiley_confused.gif