October 21st, 2004, 5:20 pm
Does anyone have a code snippet that will show me how they read data from Excel using VB.Net?I have done this successfully with VB6 using the "Worksheets" and "Cells" object. I am trying to read in about 9000 rows, each with about 10 fields. Nothing tricky. Just a sequential read until I hit a blank cell.However, with VB.Net and Option Strict On, the process is forcing me to use the "Range" object which seems to be a lot slower. Something that took about 20secs in VB6 is now taking about 50 secs in .Net. I am about to give up, save the data to a CSV on the sly and read it in from there (which will be faster than the original 20secs but a little sloppy).Note that I have done all the normal periphal stuff like turning off Screenupdating, Calculation, UpdateLinks yada yada.Any help would be appreciated.RegardsTerror