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:
00537382
Vues:
13
You have sparked my mind and I think I have come up with a solution. I will keep my Excel "template" files but rather than counting on the ClipBoard to cut and paste, I can use FoxPro to do the work. I have at least modularized my program enough that I call a function to do the copying and pasting. I'll change that function to pull all the information from my template cells into an array or cursor file and then apply them back to the correct rows on the spreadsheet.

I just hope the speed doesn't take too much of a hit. We shall see.

Thanks for your input.

Sean


>Sean,
>
>I've not done a lot of Excel automation, but I think it's pretty easy to apply a style to a block of cells without involving the clipboard in the operation. You might check out the Granor/Martin book available from Hentzenwerke.
>
>Other that that you'll have to use a clipboard empty/full semaphore system to try and keep your independent processes from stomping each other. But that's not going to be foolproof because you can't "lock" the clipboard and both processes may detect the clipboard going empty and both fill it with only the last one winning. Can you use an rlock() on a single table all processes share? I still believe this is going to be a lot harder to get working than doing the automation calls.
>
>
>>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. I guess its kind of similar to the screen designer vs. creating the screen in code debates I recall from back in FoxPro for DOS days. Its a matter of preference. I didn't always need to do more than one report at a time, but as the number of reports has accumulated, the need has now arisen. (hindsight is always 20-20). LOTS of reports may have to be re-coded.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform