Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save Excel worksheet as text from VFP
Message
De
09/05/2001 08:54:03
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00505014
Message ID:
00505219
Vues:
21
>>I need to create a comma delimited text file from an Excel 97 spreadsheet using OLE Automation in VFP. I can't seem to find an example of how to do this.
>>
>>I know enough to instantiate Excel and open the workbook and navigate to the worksheet using the Excel object but how do I find the command to Save As comma delimited? Something like oWs.SaveAs("Myfile.txt",42) where 42 is the arbitrary number denoting the file type.
>>
>>Documentation is sparse. Thanks for your help!
>
>Look at the vbaxl?.chm file for most of the help you'll ever need.
>
>On my website is an article that has all of the Excel97 constants. Here's the XlFileFormat section:
>
>
* XlFileFormat
>
>#define xlAddIn  18
>#define xlCSV  6
>#define xlCSVMac  22
>#define xlCSVMSDOS  24
>#define xlCSVWindows  23
>#define xlDBF2  7
>#define xlDBF3  8
>#define xlDBF4  11
>#define xlDIF  9
>#define xlExcel2  16
>#define xlExcel2FarEast  27
>#define xlExcel3  29
>#define xlExcel4  33
>#define xlExcel5  39
>#define xlExcel7  39
>#define xlExcel9795  43
>#define xlExcel4Workbook  35
>#define xlIntlAddIn  26
>#define xlIntlMacro  25
>#define xlWorkbookNormal  0xffffefd1
>#define xlSYLK  2
>#define xlTemplate  17
>#define xlCurrentPlatformText  0xffffefc2
>#define xlTextMac  19
>#define xlTextMSDOS  21
>#define xlTextPrinter  36
>#define xlTextWindows  20
>#define xlWJ2WD1  14
>#define xlWK1  5
>#define xlWK1ALL  31
>#define xlWK1FMT  30
>#define xlWK3  15
>#define xlWK4  38
>#define xlWK3FM3  32
>#define xlWKS  4
>#define xlWorks2FarEast  28
>#define xlWQ1  34
>#define xlWJ3  40
>#define xlWJ3FJ3  41
Those file constants are essential! Thanks, David!
Jeff Trockman, MCP
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform