03-19-2007
Assuming the orginal file contents
$ cat /tmp/file.txt
NAME ID YEAR
abc 25 1995
ced 34 1977
ttt 43 1983
Create a csv file,which i assume can be opened up in XL,
awk '{print $1","$2","$3}' < /tmp/file.txt > /tmp/file.csv
cat /tmp/file.csv
NAME,ID,YEAR
abc,25,1995
ced,34,1977
ttt,43,1983
Open the file.csv in Excel. Please let me know if this helps
This User Gave Thanks to ennstate For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have several hundreds of text files which I would like to combine them onto excel sheet. Does anyone know how to combine them into different excel sheet in one workbook using Bash script?
Please advise. THanks.
I forgot to mention my file is something like below:-
A B ... (5 Replies)
Discussion started by: ahjiefreak
5 Replies
2. Shell Programming and Scripting
I would like to read data from excel sheet as a input to a shell script.
Myproblem is the excel sheet is in windows. How can I write a shell script to read data from that excel sheet?
How can I do that?. (4 Replies)
Discussion started by: vj8436
4 Replies
3. Shell Programming and Scripting
Hi Guys,
I like to create a excel sheet with four tabs.
Is it possible to create it. Acutually i want to apply formulas in fourth tab which uses the three different tabs.
Is it possible to create such a script?
Thanks & regards,
Magesh (3 Replies)
Discussion started by: mac4rfree
3 Replies
4. Shell Programming and Scripting
Hi All,
Is it possible to have AutoFilter applied in the Excel Sheet which is Exported from UNix server as *.csv file. (0 Replies)
Discussion started by: rawat_me01
0 Replies
5. Shell Programming and Scripting
Hi,
My requirement is to get attach two different text file contents to two different sheets in same excelsheet. Also, is there any way we can name the tabs as desired ?
Kindly assist. (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies
6. Shell Programming and Scripting
Hi,
Would anyone be able to tell me how to check the number of rows in an excel sheet on unix box, please?
Cheers,
Girish. (2 Replies)
Discussion started by: girish1428
2 Replies
7. Shell Programming and Scripting
Hi,
Is there a way to find the count of number of rows of a.txt please? Where a.txt is as follows:
/usr/bin/uuencode /tmp/a.csv a.csv > /tmp/a.txt
#a.csv is a comma separated variable file
Cheers,
Girish. (7 Replies)
Discussion started by: girish1428
7 Replies
8. UNIX for Dummies Questions & Answers
Hi,
i have some data in a temporary file in Unix (the data is taken from the result of an SQL query). Now i want to dump that data into an excel sheet. How to do that. Someone please advise. Thanks
Regards,
Vinit (3 Replies)
Discussion started by: vinit raj
3 Replies
9. UNIX for Dummies Questions & Answers
hi,
i wanted to add unix data to be updated to the excel sheet. (3 Replies)
Discussion started by: rupesh.bombale
3 Replies
10. Shell Programming and Scripting
Hi Folks,
Can you please advise for any script in unix such that for example , i have 3 different excel sheet at the location /ppt/gfr/exc so the name s of the excel sheet are
1excel.xslx
2excel.xslx
3excel.xslx
now in these 3 different excel sheet there is lot of data for example each... (3 Replies)
Discussion started by: punpun66
3 Replies
LEARN ABOUT DEBIAN
xls2csv
xls2csv(1) General Commands Manual xls2csv(1)
NAME
xls2csv - reads MS-Excel file and puts its content as comma-separated data on standard output
SYNOPSIS
xls2csv [-xlV] [-f format ] [-b string ] [-s charset ] [-d charset ] [-q number ] [-c char] files
DESCRIPTION
xls2csv reads MS-Excel spreadsheet and dumps its content as comma-separated values to stdout. Numbers are printed without delimiters,
strings are enclosed in the double quotes. Double-quotes inside string are doubled.
OPTIONS
-x print unknown Unicode chars as xNNNN, rather than as question marks
-l list known charsets and exit successfully
-cchar cell separator char. By default - comma.
-bstring
sheet break string. This string (by default - formfeed) would be output at the end of each workbook page. This string is printed
after page starting at start of line, but no linefeed would be automatically added at the end of string. Include newline at the ent
of sheet separator if you want it to appear on separate line by itself
-gnumber number of decimal digits in the numbers. By default maximal double precision (system-dependent macro DBL_DIG) is used.
-qnumber
set quote mode. In quote mode 0 cell contents is never quoted. In quote mode 1 only strings which contain spaces, double quotes or
commas are quoted. In quote mode 2 (default) all cells with type string are quoted. In quote mode 3 all cells are quoted.
-dcharset`
- specifies destination charset name. Charset file has format described in CHARACTER SETS section of catdoc(1) manual page. By
default, current locale charset would be used if langinfo support was enabled at the compile time.
-scharset
- specifies source charset. Typically, Excel files have CODE PAGE record, which denotes input charset, but for some reason you may
wish to override it.
-fformat
- specifies date/time format to use for output of all Excel date and time values. If this option is not specified, format, speci-
fied in the spreadsheet is used. On POSIX system any format, allowed by strftime(3) can be used as value of this option. Under MS-
DOS xls2csv implements limited set of strftime formats, namely m, d, y, Y, b, l, p, H, M, S.
-V outputs version number
FILES
${HOME}/.catdocrc, catdoc charset files and substitution map files (see catdoc(1) manual page for details,
SEE ALSO
cat(1), catdoc(1), strings(1), utf8(7), unicode(7)
AUTHOR
V.B.Wagner <vitus@45.free.net>, based on biffview by David Rysdam
MS-Word reader Version 0.94.4 xls2csv(1)