XLS para CVS

Project:libxlsx
Component:Miscellaneous
Category:task
Priority:normal
Assigned:Cláudia Martins
Status:active
Description

Hello everybody.
I need to turn a csv file into xls in Unix.
How? Does anyone have a program in Progress?
Thanks,
Cláudia Martins


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tamhas's picture

#1

Seems like you have attached this message to a project (libxlsx) which has code to do the job. What are you missing?

If you can't just open the CSV file in Excel and get what you want, you are going to have to read the CSV file into a temp-table or whatever and then put it back out as an Excel file. This project and the Temp-Table Expositor, which you will also find on OE Hive, can do that with minimum programming on your part.


#2

Hello,

Actually I work in a Unix environment. I get an excel file (. Xls) and must save it as (. Csv), (so that the columns are formatted using ";"), but it must be through a program in Progress, do not want the intervention of the User .
From the file (. Csv)'ll import it to the tables of Progress (UNIX), so I need the file csv.

Gratefully
Claudia


tamhas's picture

#3

So, the need is XLS -> CSV not the other way around as in your original message?

If so, the obvious thing is to simply save the file as CSV on the originating end.

I don't know that anyone has done any work on *reading* XLS in ABL. XLSX maybe, but not XLS.


#4

Sorry, you're right, we must convert xls or xlsx to csv.
Could you help me?
Thanks,
Cláudia


tamhas's picture

#5

I don't know anyone who has worked in this area. Typically, if one wants a CSV, then one just saves the spreadsheet as a CSV. No programming required.

If you had an XLSX, you could try reading it with ABL XML tools, but it sounds like a big job to parse it in order to merely extract the bare data ... especially when it is so easy to get the bare data from the point of origin.


#6

Ok, thank you for your time willing to try to help me ...

Att
Claudia


alonb's picture

#7

no prob.

to convert csv => xls:


{libooxml.i}

run ooxml_convert( "/tmp/test.csv", "/tmp/test.xls" ).

to convert xls => csv:


{libooxml.i}

run ooxml_convert( "/tmp/test.xls", "/tmp/test.csv" ).

libxlsx.p currently support the following conversions, for Spreadsheet documents

From:

Microsoft Excel 2007 (*.xlsx)
Microsoft Excel (*.xls)
OpenDocument Spreadsheet (*.ods)
StarCalc (*.sdc)
OpenOffice.org 1.0 Spreadsheet (*.sxc)
Unified Office Format spreadsheet (*.uos)
Lotus 1-2-3 (*.wk1,*.wks,*.123)
Quatro Pro (*.wp2,*.wpf)
HTML (*.html)
dBASE (*.dbf)
Data Interchange Format (*.dif)
SYLK (*.slk)
Comma-Separated Values (*.csv)
Tab-Separated Values (*.tsv)

To:

Microsoft Excel (*.xls)
OpenDocument Spreadsheet (*.ods)
StarCalc (*.sdc)
OpenOffice.org 1.0 Spreadsheet (*.sxc)
Unified Office Format spreadsheet (*.uos)
Portable Document Format (*.pdf)
HTML (*.html)
XHTML (*.xhtml)
dBASE (*.dbf)
Data Interchange Format (*.dif)
SYLK (*.slk)
Comma-Separated Values (*.csv)
Tab-Separated Values (*.tsv)

libxlsx.p is not pdfinclude, there's nothing to learn.

look at the samples in the libooxml/samples dir (it shouldn't take more then 10 minutes). it has everything you'll ever need to know about libxlsx.p.

contact me privately if you need a hand with the installation


#8

Alonb,

ok, I will test as their orientations...

Thank you,
Claudia


alonb's picture

#10

No problem we could convert .xls to .csv on UNIX/Linux.

We could also load it directly to a temp-table or dataset, if you want (again on UNIX/Linux).

Please feel free to contact me privately if you have any questions.

Regards
Alon Blich
alonblich@gmail.com