LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   text convert to excel (https://www.linuxquestions.org/questions/linux-newbie-8/text-convert-to-excel-856247/)

elainelaw 01-14-2011 02:09 AM

text convert to excel
 
We would like to use linux tools to convert csv file to excel file , can advise any simple tools can do that ? thx

druuna 01-14-2011 02:13 AM

Hi,

What does the csv file look like?

In general any csv file can be imported into excel as long as there is a unique separator (if it is an actual csv file, that is already the case).

Hope this helps.

Soadyheid 01-14-2011 06:08 AM

Hmmm... I'd be inclined to be lazy and open the .csv file with OpenOffice Calc then save it as a .xls file. :) or were you looking for some sort of scripting solution...?

Play Bonny! :hattip:

druuna 01-14-2011 06:12 AM

Hi,
Quote:

Originally Posted by Soadyheid (Post 4223969)
Hmmm... I'd be inclined to be lazy and open the .csv file with OpenOffice Calc then save it as a .xls file. :)

Why the long way around? As I already mentioned: You can load/import the file straight into excel (if that file is an actual csv file).

elainelaw 01-16-2011 10:11 PM

Quote:

Originally Posted by druuna (Post 4223844)
Hi,

What does the csv file look like?

In general any csv file can be imported into excel as long as there is a unique separator (if it is an actual csv file, that is already the case).

Hope this helps.

it just as a standard csv file , the text is separated by "" sige .

if I just want to use linux tool to convert it , can adivse what tool I should use ? Thx

chrism01 01-16-2011 11:06 PM

If it's a csv file, then the separator is a comma ','. As above, Excel automatically recognises and will load a csv without any conversion needing to be done.
You may need to check that the FTP or other txfr process results in MS type line endings.

druuna 01-17-2011 03:45 AM

Hi elainelaw,

Maybe this will help: Excel: How to Import CSV Files

The link also explains how to set the delimiter (as in your case, the example used is a space). Based on excel 2007, but I guess the other versions are basically the same.

Hope this helps.

Soadyheid 01-17-2011 05:22 AM

Quote:

Hi,
Quote:
Originally Posted by Soadyheid View Post
Hmmm... I'd be inclined to be lazy and open the .csv file with OpenOffice Calc then save it as a .xls file.
Why the long way around? As I already mentioned: You can load/import the file straight into excel (if that file is an actual csv file).
I know you can load .csv files directly into Excel but for me to do this under Linux I'd have to probably load up Wine and go and buy a copy of MS office to get use of Excel. I'd consider this a longer way round than using Open Office.
As this is a Linux forum I'm assuming the question was asked in a Linux context. :)
(However, I usually find "Assume" = 1st mistake! :D )

Play Bonny! :hattip:

schneidz 01-17-2011 11:09 AM

the difficulty being that ms-excel is a proprietary format so any scripting will be fairly complex (especially since bash doesnt process binary very well):

google("bash csv to xls")[2] = http://forums.devshed.com/perl-progr...ls-603977.html

happy hacking.


All times are GMT -5. The time now is 09:58 PM.