Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel 95 and Excel 97
Message
De
20/07/1998 04:02:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00119124
Message ID:
00119183
Vues:
18
>>>I have a view which I have copied to an XL-file with "COPY to myxl TYPE XL5". I want to clean it up, adjusting columns, change the headers and so on. I have tried to use OLE which works nice but.... when I'm closing the XL-file , I get that annoying "This file was created in another format than Excel97. Do you want to change it to Excel97" or something like that (I am using Swedish version of Office 97).
>>>
>>>My code looks like this:
>>>
>>>objExcel = CreateObject("Excel.Application")
>>>cFileName = sys(5)+curdir()+alltrim(report_header)+".xls"
>>>objBook = objExcel.WorkBooks.Open(cFileName)
>>>...
>>>some code
>>>...
>>>objBook.Saveas(cFilename)
>>>objBook.Close(.f.)
>>>objExcel.Quit
>>>
>>>I can solve the problem if I change the filename when I save the file and then I delete the original file and rename the new. According to the Helpfile in Excel you might have a parmeter xlNormal to save the file in the correct format to avoid the upgradequestion. How do I use it?
>>>
>>>/Pierre Unge, Sweden
>>
>>#define xlExcel5 39
>>objBook.Saveas(cFilename,xlExcel5)
>>objBook.Close(.t.) && Save changes w/o prompt
>>Cetin
>
>Hi Cetin
>#define xlExcel5 39 seems like it saves in Excel95 format. How do I save in Excel97 format?
>/Pierre
I think it should be just .close(.t.) && Save w/o prompt.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform