Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed up Excel creation
Message
From
12/05/2004 21:53:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
12/05/2004 00:45:32
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00903068
Message ID:
00903457
Views:
16
Some optinos for fast access are:
  • Copy & Paste.
  • COPY TO ... TYPE XLS; then use Automation for some finer control.
  • Omit zero or blank values if it makes sense to do so. A conditional in VFP is much faster than a useless communication between VFP and Excel.
  • Process multiple cells at once, like this:
    .Range(.Cell(1,1), .Cell(5,5)).Font.Bold = -1
    >Does anyone have any tips for speeding up the creation of excel files using
    >createobj('excel.application')
    >and then populating cells with
    >oApp.workbooks(1).sheets(1).cell(x, y) = {somevalue}
    >Doing it this way gives me the control I need over multiple sheets but is MUCH slower than COPY TO {ddd} TYPE XLS.
    >For example, are their some properties of the excel object I can set to speed things up?
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform