I am exporting data to excel but inserting rows is very slow about 2 seconds per row, the line of code I used sucsessfully in VS 2003 was "oSheet.Rows(oRow + 1).Insert()".

I am now using VS 2008 to excell 2007 and as well as the previous code I have tried inserting a range "oSheet.Range(sRowRange).EntireRow.Insert()", but it is still slow.

If I don't insert rows, the data goes in as fast as before.

It may have something to do with the reference file

Imports Excel = Microsoft.Office.Interop.Excel?

Any help would be appreciated.

Regards Malcolm

Recommended Answers

All 2 Replies

Member Avatar

Nah I get the same problem, in the end I just abandoned writing directly to excel.

Unfortunatly I don't have that option, I have to output reports as excel files.

Regards Malcolm

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.