Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Karben Selim Mejia
  Where is Karben Selim Mejia?
 San Pedro Sula
 Honduras
 Karben Selim Mejia
 To: Steve Bloodsworth
  Where is Steve Bloodsworth?
 Sarasota
 Florida - United States
 Steve Bloodsworth
 Tags
Subject: RE: Excel -- Saving (Safety Off)
Thread ID: 16120 Message ID: 16124 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, October 09, 2002 5:20:34 PM         
   


> When I am creating spreadsheets based on VFP tables, I generally format the spreadsheet after I export the raw data to it (resize columns, change fonts, add some borders and shading, etc.). The problem I am having is to save this modified spreadsheet without having the user prompted for anything. It seems that either it is asking if I want to save in the 5.0 format, or save it in the new 2000 format (XLAPP.SAVE), or asking me if I want to replace the file that already exists (XLSHEET.SAVEAS()).
>
> I just want to save it and quit.
>
> Any Ideas?
>
> Thanks,
>
> ~S

Not pretty sure but this works for me

LOCAL oexcel as Excel.Application

oExcel = createOBJECT("Excel.application")
oExcel.Workbooks.Add()
oexcel.Visible = .T.
oexcel.Cells(1,1).Value = "test"
oexcel.ActiveWorkbook.SaveAs("test.xls")



if the file already exist then you will have to test this before runnign the code and if the file exitts you have to delete it before saving the new one


Karben Selim Mejia

I always have the last word in my home, "Yes sweet heart, what ever you say"

Honduras, Central America
The very center of the world

ENTIRE THREAD

Excel -- Saving (Safety Off) Posted by Steve Bloodsworth @ 10/9/2002 3:59:37 PM
RE: Excel -- Saving (Safety Off) Posted by Raymond Hartman @ 10/9/2002 5:04:03 PM
RE: Excel -- Saving (Safety Off) Posted by Karben Selim Mejia @ 10/9/2002 5:20:34 PM
RE: Excel -- Saving (New Sheet) Posted by Steve Bloodsworth @ 10/9/2002 6:08:05 PM
RE: Excel -- Saving (New Sheet) Posted by Karben Selim Mejia @ 10/9/2002 9:17:31 PM