Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating excell file behind the button
Message
From
26/04/2002 22:21:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Creating excell file behind the button
Miscellaneous
Thread ID:
00649917
Message ID:
00649917
Views:
39
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
Next
Reply
Map
View

Click here to load this message in the networking platform