Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clipboard Collisions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00536525
Message ID:
00537373
Vues:
11
>>Transfering large amounts of data is one reason I am using it. But I also find it easier and quicker to set up a "template" in Excel with all my cell formatting. I do a lot of borders and shading and it would be tedious for the program to do all this stuff for each cell programmatically. The way I'm currently doing it, the program just has to dump in the data and then copy the cell formats.
>
>Why don't you just save an excel file with the formatting that you need and then open it and "save as" whenever you need to use those styles?
>
>Alex

Its not really quite that simple. To explain further this is generally what I'm doing:

I have a .xls file with a row of cells with all the correct formats (sometimes more than one row depending on the complexity of the report)

The FoxPro program copies that .xls file to another .xls using a naming convention based on our fiscal week and year appended on to the stem of the .xls filename (so reports don't overwrite each other)

FoxPro then opens the new .xls file that was created in the above copy

I then copy the formatting rows to the clipboard, then paste them to multiple rows based on the # of records that will be dumped into the spreadsheet

I then dump the data into the spreadsheet using DataToClip and OLE to paste.

Then I save the spreadsheet and close it.

I think I have come up with a semi-painless solution based on David's advice. See my response to him if you are interested.

Sean
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform