-
Hi, I'm using VB6, creating reports using Excel object, eg:
Code:
Set xlOut = CreateObject("Excel.Application")
With xlOut
.DisplayAlerts = False
.Workbooks.Open "C:\Data\T1L.xls"
.Worksheets(1).Name = "SUN101_" & BatchNo
For ColLoop = 0 To 13
.Columns(ColLoop + 2).ColumnWidth = ColWidths(ColLoop)
Next ColLoop
etc. etc.
But it's so dreadfully slow - anyone know:
1. Why?
2. How can I speed things up withough dumping Excel.
And before anyone says "Yes, but why are you using Excel", it's so easy to populate, save, view, print and all that jazz. And I suppose you'll say, well, speed is the price you pay for all that convenience. And I'll go and cry in a corner or something. And I'm not even a girl...
-
coox,
I agree with you. Excel is much easier to manipulate than Crystal or the Data Report.
But I think the only way you'll make it run faster would be to add more memory to your pc. Excel takes forever to launch even on a fast pc.
-
Just a thought, but how about having Excel load and format itself while the user is doing something else, like filling in a form or something. Or create a template that has all of the formatting done already. Also, what part of the code seems to be consuming the most time?