Converting .xls into .csv and find & Replace


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Converting .xls into .csv and find & Replace
# 1  
Old 06-22-2010
CPU & Memory Converting .xls into .csv and find & Replace

Hi All,
Please give me the solution to the following ASAP.

1) Converting the .xls into .csv
Script i tried,
Code:
mv hello.xls  hello.csv

The above given script converting the .xls file into .csv successfully. But after i run the below unix command I am no able to open the .csv file, its giving some "Unable to Read" Error message.

2) Script I tried to replace the commas by single space in the converted .csv file is,
Code:
tr ', ' '  ' < hello.csv > hello1.csv

When I am running the above scripts for the small files (file contains 10 records of data only) its working fine. But while trying to the big files its giving the error message as "Unable to read". Commands are running without any problem.

Plesae give me the proper solution to the above problem ASAP friends.

Thanks & Regards,
Velava.S Smilie

Last edited by pludi; 06-22-2010 at 03:34 AM.. Reason: code tags, please...
# 2  
Old 06-22-2010
you need to save the .xls file as .csv before you can proceed with further operations from EXCEL
# 3  
Old 06-22-2010
As a rule of thumb, only Excel understands Excel. All Microsoft trumpeted about open document formats was pure baloney -- it's still a proprietary binary blob, wrapped in an open container format but still a proprietary binary blob.
# 4  
Old 06-30-2010
Quote:
Originally Posted by Corona688
As a rule of thumb, only Excel understands Excel. All Microsoft trumpeted about open document formats was pure baloney -- it's still a proprietary binary blob, wrapped in an open container format but still a proprietary binary blob.

I could not get this.. Please give me the solution to achive the above problem statement.
# 5  
Old 07-06-2010
The best way is to save it as CSV, in excel. It's certainly capable of doing so. Failing that you could try saving it as a "legacy" pre-office-2007 excel file for which certain perl modules exist that can use it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script for converting to xls and to mail the same

i have installed CENTOS in VMware. I want the linux command to run in CENTOS. The command is to select data's from Event table(our table name) convert into .xls and mail every 2hrs. Can you please help me in writing this script. Thanks, Shobana (1 Reply)
Discussion started by: shobana praveen
1 Replies

2. Shell Programming and Scripting

Find and replace variables using a csv table

I have a flat file (template) where I want to replace variables based upon a value in another file (csv). The variables in the template are named %VAR_X_z% The values are in the csv file and X is field 0 of each line and y field 1 and up. Example of the csv: Badidas, 13.00, 12.00, 11.00,... (8 Replies)
Discussion started by: biscayne
8 Replies

3. Shell Programming and Scripting

Converting a list to X columns of csv (& wrapping a command around it)

Hi All, Random question, how would you convert a data file from a list like so: 12345 12346 12347 12348 12349 12350 ... <snip 100+ lines> ... to comma separated X columns across: 12345,12346,12347 12348,12349,12350 Why would you want to do this? The background to this is a... (2 Replies)
Discussion started by: craigp84
2 Replies

4. Shell Programming and Scripting

Converting huge xls(having multiple tabs) to csv

hello I have browsed for the similar requirement i found this https://www.unix.com/shell-programming-scripting/40163-xls-csv-conversion.html but my problem is i have multiple tabs in xls file having same metadata I want to convert it into single csv file any ways to do it pls... (5 Replies)
Discussion started by: joshiamit
5 Replies

5. UNIX for Dummies Questions & Answers

converting xls,xlsx files ??

I think I know the answer to this :rolleyes: but thought I'd ask anyway. You never know. Does anyone know of a program or utility that will run on any unix platform and convert Microsoft Excel files to ascii/plain text files that unix can understand ? Thanks in advance. Floyd (3 Replies)
Discussion started by: fwellers
3 Replies

6. Shell Programming and Scripting

find & replace comma in a .csv file.

HI, Please find the text below. I receive a .csv file on server. I need the comma(,) in the second column to be replaced by a semi-colon( ; ). How to do it. Please help. Sample text: "1","lastname1,firstname1","xxxxxx","19/10/2009","23/10/2009","0","N","Leave"... (2 Replies)
Discussion started by: libin4u2000
2 Replies

7. Shell Programming and Scripting

Find & Replace string in multiple files & folders using perl

find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g' this is simple logic to find and replace in multiple files & folders Hope this helps. Thanks Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies

8. UNIX for Advanced & Expert Users

Converting .csv file into .xls file and send it to inbox

Hi All, I wrote a script to extract data from Oracle DB and place it in a text file , and I have coverted .txt file into comma seperated .csv file and I sent it to my mail box . I can get .xls file in my inbox.I am getting all data in same column and in different rows , without column... (1 Reply)
Discussion started by: krthkmuthu
1 Replies

9. Shell Programming and Scripting

converting xls file to txt file and xls to csv

I need to convert an excel file into a text file and an excel file into a CSV file.. any code to do that is appreciated thanks (6 Replies)
Discussion started by: bandar007
6 Replies

10. Shell Programming and Scripting

Converting csv to xls

Hi, Can anyone tell the option to change the file type in unix. i.e. if a file is in csv(Comma Separating Values) format, it should be changed to xls(ordinary MS-Excel) format. But renaming command is not changing to correct file format. Thanks in advance, Milton. (1 Reply)
Discussion started by: miltony
1 Replies
Login or Register to Ask a Question