Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Excel files in different versions

Status
Not open for further replies.

RoadRunnerOz

Programmer
Aug 22, 2000
128
AU
Any ideas on how to save an excel file V5 as Excel V7 through automation?

I tried ....activeworkbook.saveas(filetosave,Xlformat7)
where Xlformat7=43

Excel still asks me if I want to save in the new format.

Thanks Michael Ouellette
mouellette@compuserve.com
 
I am dealing with office 97, so there may be differneces in discriptors. have you tried setting the excel global XlFileFormat property to xlExcel7? Attitude is Everything
 
I have no control over 100's of PC's set up at users site. Some have Office 97, some have 2000 and some have XP.
VFP 6 exports in Excel 5 format.
using this creates the prompt:
oleapp.APPLICATION.activeworkbook.saveas(myfile)

There must be a way programatically to save in a different
excel version by passing a parameter. Looking a VB code it seems like ...activeworkbook.saveas(myfile,-43) should do it but noooo.

Thanks in advance Michael Ouellette
mouellette@compuserve.com
 
HI !!
Why is important the version of Excel?
If you don't write xlformat - it'll be written in Excel in theirs computer. Have you any special function in sheets?
Monika Kind regards to you all from Warsaw !!!!!
 
#define xlExcel7 39
oleapp.APPLICATION.XlFileFormat = xlExcel7

XlFileFormat is a excel global property. Attitude is Everything
 
monikai: I don't care about the version. I don't want the user to have to answer any questions. Saying yes to 100 files is a bit tedious.

My solution was:
oexcel.Application.displayalerts=.f. <--
oexcel.activeworkbook.saveas(m.efile,43)

Looks like oleapp.APPLICATION.XlFileFormat = xlExcel7
would also work.

Thanks all Michael Ouellette
mouellette@compuserve.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top