Open Excel sheet with ADO - problems

Open Excel sheet with ADO - problems

Post by Dan Brusse » Sun, 01 Feb 2004 23:33:39


I am able to open an Excell (2000) spreadsheet using ADO.NET, and for
the most part, it works well. However, partway through the records,
the data stops coming in for the column.

The column should be read as a text field, although many of the
records are all numeric. For example, in the records that ARE read
correctly, one may be 0010 and another may be 0010B.

Interestlingly, when the data stops coming through, the data begins
with a one. The row with value 0998 comes through fine, but the next
row with 1000 is blank. However, if I go into the spreadsheet and
modify the value of 1000 to add a single quote, it does come through
in the dataset. Unfortunately, I cannot modify the file in a
"production" environment, so this is not an option. I also cannot
install Excel on the server and use automation to do this.

Any suggestions as to what could help with an ADO connection?

Thanks,
Dan
 
 
 

Open Excel sheet with ADO - problems

Post by Steve C. O » Mon, 02 Feb 2004 08:31:30

Here are some alternate techniques for working with Excel spreadsheets:
http://www.yqcomputer.com/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://www.yqcomputer.com/