Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation to Excel 2007
Message
 
 
À
18/06/2009 17:19:10
Chuck Prickett
Associated Systems, Inc.
Wichita, Kansas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01407023
Message ID:
01407025
Vues:
54
>One of the little "nicety's" I give my customers is the ability to send some of their reports to an Excel spreadsheet. I have written routines that perform this function based on the directions from Hertzenwerke "Office Automation". I build the Spreadsheets with functions that create the sheet, bold the headings, box around headings, background shade headings, horizontally center the report title, freeze pane on first line after headings. All in All it makes for a very flashy spreadsheet and the user has the option of storing, emailing or printing. Anyway, this runs like a "Champ" on my Windows XP with Office XP, but in my testing on my Vista box with Office 2007, I have encountered a problem. Running under the XP/XP system when the Excel creation begins there is about a 5-10 second delay when it is creating the "Headings" and formatting the columns(this I can live with). When I run this same system on the Vista/2007 setup, that delay is sometimes as much as 45 seconds(this is not good). I have created "Templates" with the special formatting and bolding and changed the program to create the XLS from the XLT, BOOM runs fast. BUT, on some of the runs I am creating Multiple Sheets in the workbook based on a Control Break in the Data that was selected. Using a template, the formatting doesn't carry over to sheet2,sheet3, etc. Does anybody know of a way to apply the template to subsequent sheets in the workbook, OR is there a way to speed up the "Formatting" process at the new sheet creation phase. Sorry this is so long.

Chuck,

I'm guessing there is a better way around, but as alternative you can create multiple Excel files and then merge them into one.

I have a procedure based on Craig's Boyd code that does it - may need to search here.

BTW, we didn't notice much delays with my DBFToExcel program - but we haven't tested much on Vista/2007 either.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform