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:55:37
 
 
À
09/05/2001 04:22:46
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00505014
Message ID:
00505221
Vues:
24
>Jeff,
>The following is extracted from the Excel VBA help file:
>
>Returns the file format and/or type of the workbook. Read-only Long.
>Can be one of the following XlFileFormat constants:
>
>xlAddIn					18
>xlCSV					6
>xlCSVMac				22
>xlCSVMSDOS				24
>xlCSVWindows			23
>xlDBF2					7
>xlDBF3					8
>xlDBF4					11
>xlDIF					9
>xlExcel2				16
>xlExcel2FarEast			27
>xlExcel3				29
>xlExcel4				33
>xlExcel5				39
>xlExcel4Workbook		35
>xlIntlAddIn				26
>xlIntlMacro				25
>xlWorkbookNormal		-4143
>xlSYLK					2
>
>xlTemplate				17
>xlCurrentPlatformText	-4158
>xlTextMac				19
>xlTextMSDOS				21
>xlTextPrinter			36
>xlTextWindows			20
>xlWJ2WD1				14
>xlWK1					5
>xlWK1ALL				31
>xlWK1FMT				30
>xlWK3					15
>xlWK4					38
>xlWK3FM3				32
>xlWKS					4
>xlWorks2FarEast			28
>xlWQ1					34
>xlWJ3					40
>xlWJ3FJ3				41
>
>Remarks
>
>The following additional formats are available in the Far East version of Microsoft Excel: xlWJ2WD1, xlExcel2FarEast, and xlWorks2FarEast.
>
>
>So to create a CSV file you would do:
>
>loXls.ActiveSheet.saveAs(tcExcelFile, xlCSV)
>
>HTH
>
>>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!
>>
>>-JT

This is great. Thanks, Daniel.
Jeff Trockman, MCP
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform