Generate Excel sheet through coding in VB?
Hello,
In my application i am generating execel sheet through coding. But it makes my application very slow.
is there any other more efficient and optimized way to do this.?
is it possible to run pre-defined macro in VB at runtime which accept data and generate excel sheet?
All inputs are welcomed.
Thanks in advance.
HDave
Re: Generate Excel sheet through coding in VB?
Quote:
Originally posted by hdave
Hello,
In my application i am generating execel sheet through coding. But it makes my application very slow.
is there any other more efficient and optimized way to do this.?
is it possible to run pre-defined macro in VB at runtime which accept data and generate excel sheet?
All inputs are welcomed.
Thanks in advance.
HDave
I ran into this problem creating Excel spreadsheets via VB6 also.
I found that certain operations (dereferencing Range objects, inserting PageBreaks, and any general visual formatting) take extremely long and can drag your running time into the mud if placed hap-hazzardly in your loops.
Things that are fast are "data entry", where you are throwing data into cells, referenced directly from A1 on the worksheet.
For example, I made a reporting program that generated about a thousand pages in Excel. It took 40 hours to complete.
I dug around and made the above optimizations and got it down to about a half-hour.
If you are willing to spend some quality time with your code, you will find you can significantly reduce your running time.