Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel
Message
De
03/12/2002 23:53:00
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
03/12/2002 10:02:22
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Re: Excel
Divers
Thread ID:
00728989
Message ID:
00729260
Vues:
13
> I have a protected worksheet that I am populating with data from a VFP program. I get an error message saying that the cells that I am populating are readonly, which is the way it should be. Is the only way to populate the spreadsheet to unprotect the spreadsheet, populate the cells and then protect it again? Is there a different way around this?

Jim, Yes. Unprotect the sheet, do your modifications and then protect it again.
oExcel = CREATEOBJECT("Excel.Application")
oSheet = oExcel.ActiveSheet
oSheet.Unprotect("MyPassword")
*!* Do stuff here
oActiveSheet.Protect("MyPassword", .T., .T., .T.)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform