Results 1 to 3 of 3

Thread: Speed up Excel automation

  1. #1

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    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...

  2. #2
    Lively Member
    Join Date
    Jul 2000
    Posts
    104
    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.

  3. #3
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    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?
    Damonous

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width