Command line csvtoxls


Frigyesi Viktória
 

Hi Group,

 

Are you aware of any command line tools that can batch convert csv to xls – similar to pdftk which I learned about here earlier and is working so fine in production!

The only requirement is to pass parameters ont he datatypes to convert to, as real numbers must stay numbers, but text with trailing 0 should remain text.

We need to automate this from Magic XPA.

 

Looking forward to any ideas,

Cheers

 

Viktoria Frigyesi

Managing director

logo_bifor2

2310 Szigetszentmiklós

Tököli u. 33/A

Hungary

Mobile: +36 30/274-8863

 

 


 

Hi Victoria,

I build XLS with this from xpa:

https://docs.devexpress.com/OfficeFileAPI/14912/spreadsheet-document-api

With this API you can create any kind of EXCEL-File - without having EXCEL installed. The files could be much more complex than 'stupid' CSV. E.g. you can set Colour/Fontattribute, multiple Tabs,.....

It takes some training, but it's worth it.

Regards
Friedrich


Todd Baremore
 

Victoria,

I've been using this csv2excel which does not require that excel be installed.   
https://github.com/nmolinos/csv2excel/releases
Readme with command line parameters.
https://github.com/nmolinos/csv2excel/blob/master/README.md

Todd
On 1/24/2023 4:22 AM, Frigyesi Viktória wrote:

Hi Group,

 

Are you aware of any command line tools that can batch convert csv to xls – similar to pdftk which I learned about here earlier and is working so fine in production!

The only requirement is to pass parameters ont he datatypes to convert to, as real numbers must stay numbers, but text with trailing 0 should remain text.

We need to automate this from Magic XPA.

 

Looking forward to any ideas,

Cheers

 

Viktoria Frigyesi

Managing director

logo_bifor2

2310 Szigetszentmiklós

Tököli u. 33/A

Hungary

Mobile: +36 30/274-8863

 

 



Gadi Birman
 
Edited

Hello Viktoria,

Another option you have is to use COM technology from within XPA.

Here's an XPA program (version 490) that does just that:

https://magicu-l.groups.io/g/main/files/CSV2XLSX.zip

It does, however,  need Excel to be present on the machine, unlike the utility suggested by Todd.
Personally I use a .NET 3rd party solution based on the Telerik line of products, which does not need Excel to be loaded, but costs money.
I assume there are also free .NET assemblies that do the job.


Wes Hein
 

 
Uses open source applications
 


Frigyesi Viktória
 

Thanks Wes, looks very promising! Can I find any information on this project on the forum?

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Wes Hein
Sent: Tuesday, January 24, 2023 5:21 PM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] Command line csvtoxls

 

 

Uses open source applications