Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open an existing Excel file
Message
De
13/05/2005 11:48:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
13/05/2005 11:39:55
Justin Roper
The Cadle Company
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01013850
Message ID:
01013903
Vues:
13
>Not sure what you mean. I am using the following code..
>
>oExcel = CREATEOBJECT("Excel.Application")
>oExcel.Visible = .T.
>oBook = oExcel.Workbooks.FOPEN(xlFile)
>oSheet = oBook.ActiveSheet
>
>and it will allow me to open it and write to it even though it is ReadOnly. I want to prevent this from opening until someone else is done using it.

I didn't know excel had an fopen(), does it really (versions I've do not)?
lnHandle = FOPEN(m.xlFile,12)
llNotInUse = (lnHandle > 0)
if m.llNotInUse
 fclose(m.lnHandle)
 *oExcel.WorkBooks.Open(m.xlFile)
 *...
else
* check ferror etc
endif
Or open with notification:
oExcel.Workbooks.Open(m.xlFile,,,,,,,,,,.t.) && Use notification
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform