Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Steve Bloodsworth
  Where is Steve Bloodsworth?
 Florida - United States
 Steve Bloodsworth
 To: Karben Selim Mejia
  Where is Karben Selim Mejia?
 San Pedro Sula
 Karben Selim Mejia
Subject: RE: Excel -- Saving (New Sheet)
Thread ID: 16120 Message ID: 16125 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, October 09, 2002 6:08:05 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

Great, thank you. I hadn't considered that I must rename/delete/re-save. Worked great, and apparently the SaveAS isn't prompting for new version save.

One other thing. I'd like to have the 5 or so spreadsheets that I save put into one workbook as different sheets. I've tried getting the command to do this, but couldn't get past the SHEETS().MOVE command.

Any help, again, would be appreciated.




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