Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.xls file from text file
Message
From
02/11/1999 08:37:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/11/1999 08:09:32
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00285341
Message ID:
00285396
Views:
19
>Cetin,
>
>Thanks for the reply.
>My text file is delimited with ';'.But I just need to create the .xls from .txt file, do not want to open it at the same time, User will open it later on.


Then slightly change code to use ";" instead of ",", save as xls and exit.
#Define xlExcel5  39
#Define xlExcel7  39
#Define xlExcel9795  43
lcTxtName = sys(5)+curdir()+"mytext"
oExcel = createobject("Excel.application")
With oExcel
  .Workbooks.open(lcTxtName+".txt", , , 6, , , , , ";")
  With .ActiveWorkbook
    .SaveAs(lcTxtName+".xls",xlExcel5)
    .Saved = .t.
  Endwith
  .Quit
Endwith
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform