LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2011, 03:09 AM   #1
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Rep: Reputation: 30
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
 
Old 01-14-2011, 03:13 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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.
 
Old 01-14-2011, 07:08 AM   #3
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18 at present.
Posts: 1,192

Rep: Reputation: 204Reputation: 204Reputation: 204
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!

Last edited by Soadyheid; 01-14-2011 at 07:09 AM.
 
Old 01-14-2011, 07:12 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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).
 
Old 01-16-2011, 11:11 PM   #5
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by druuna View Post
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
 
Old 01-17-2011, 12:06 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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.
 
Old 01-17-2011, 04:45 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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.
 
Old 01-17-2011, 06:22 AM   #8
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18 at present.
Posts: 1,192

Rep: Reputation: 204Reputation: 204Reputation: 204
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! )

Play Bonny!
 
Old 01-17-2011, 12:09 PM   #9
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,051

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
convert excel to csv and html thelonius Programming 3 03-28-2007 12:16 PM
Convert Excel spreadsheet to Open Office. Nick_James Programming 6 01-09-2006 07:03 AM
Convert Excel to CVS from command line? technick Linux - Software 0 12-27-2005 04:55 PM
convert text file to binary excel file ust Linux - General 2 11-23-2004 03:33 AM


All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration