Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating excell file behind the button
Message
De
26/04/2002 22:21:40
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Creating excell file behind the button
Divers
Thread ID:
00649917
Message ID:
00649917
Vues:
40
Hi all,

I want to create report in excell format but I don't want to display it in excell application, so when user click the button it will automaticly create it. I've tried with this code :
tmpsheet = createObject('excel.application')
XLApp = tmpsheet.application
XLApp.Visible = .t.
XLApp.WorkBooks.Add()
XLSheet = XLApp.ActiveSheet
* creating file in excell format
with xlsheet
       .Cells(1,1).Value = " "
       ....
endwith
lcXLS='c:\temp.xls'
with xlapp
     .ActiveWorkbook.SaveAs(lcXLS, -4143, "", "", .F., .F.) 
     .Workbooks.Close
endwith
release tmpsheet
But it still display in excell application and it only close the work sheet.
Anybody knows what's going on ?

TIA,

Budianto
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform