Monday, 30 January 2006
ADOX + Excel: bogus worksheets
a web site i'm working on imports excel documents, and does some processing on them for importing into a database. I use the code from this post
to do the importing, and it works nicely. I recently came across a problem where i was encountering duplicate records, and it took me ages to figure out why. Apparently a 'named range' of cells in a worksheet is treated as a Table by ADOX. so you get more than you bargain for when you iterate through the tables in the resulting DataSet.
I was able to work around the problem by discarding any tables that do NOT end in the dollar $ character.
Monday, 30 January 2006 15:30:12 (GMT Standard Time, UTC+00:00) .Net General | Asp.Net | Database