CSV to XLS

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

Locked
alangonzalez91
Posts: 6
Joined: Sun Jun 13, 2010 12:52 pm
Location: Chaco - Argentina

CSV to XLS

Post by alangonzalez91 »

Option Explicit

Const xlDelimited = 1
Const xlNormal = -4143

Dim Excel

Set Excel = CreateObject("Excel.Application")
With Excel
.Workbooks.Open "[%1]"
.Sheets(1).Columns("A").TextToColumns .Range("A1"), xlDelimited, , , , True 'semicolon-delimited
.ActiveWorkbook.SaveAs "[%2]", xlNormal
.Quit
End With

[%1] = Source .csv
[%2] = Destination .xls

You need excel office installed

Try it, greetings and blessings
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: CSV to XLS

Post by Neosoft Support »

That's a great script. Thank you for sharing it with us.
NeoSoft Support
yanzco
Posts: 192
Joined: Sun Jul 20, 2014 4:07 am

Re: CSV to XLS

Post by yanzco »

wow great...
can it do about xls to csv ?
alangonzalez91
Posts: 6
Joined: Sun Jun 13, 2010 12:52 pm
Location: Chaco - Argentina

Re: CSV to XLS

Post by alangonzalez91 »

When I find it I post it, greetings!
Locked