Need to send a report thru mail using unix shell script(AIX). can you help me to do this? . i tried "uuencode" with CSV format, but while reading report all values are in single column. i need each column values in separate cell.
Are you saying that the file was attached to the email okay? If so, then we need to check the format of your file.
Excel can read most things quite well, but I think your file is space separated. If you use a comma to separate the columns and then see what Excel makes of it, that might help. The CSV does stand for Comma Separated Values after all.
If this still doesn't help, change it to be a .txt file and then Excel will launch the import wizard and guide you through opening it where you can tell it the column separators/delimiters or fixed column widths or whatever.
I hope that this helps. Let us know how you get on.
It's also possible that you forgot to add carriage returns to your file before you sent it. Windows/Excel expects these, it will not see \n by itself as an indicator of a new line. To add them to a file:
Hi Robin,
Thank you very much for replying,
yes, i am able to send the file via mail (attachment). While opening the file in excel (whatever the format .CSV or .xls) the outputs are in single column.
eg:
A1 B1 C1 D1 E1...
hello welcome to unix forum
But i want like this.
A1... B1....... C1 D1.. E1....
hello welcome to unix forum
this should me done in shell script. i dont want to do anything in excel.
Please help me.
thanks,
---------- Post updated at 03:12 AM ---------- Previous update was at 03:07 AM ----------
Hi Corona688,
Thanks for your suggestion. I tried it, it didn't work. Can you please help?
When the file is sent, is it still named as a .csv? You could also try calling it a .txt which should get Excel to fire up the import wizard where you can manage the delimiters yourself.
As a test, if you create the following file with Notepad on your PC saving it as both my_test.csv and my_test.txt, can Excel open them? If so what does it do with the files?
1,2,3,4,5
a,b,c,d,e
A,B,C,D,E
Don't use anything fancy as the editor. A plain notepad is best so it does not add in all the editor specific detail such as MS-Word, StarOffice, etc. will.
As a further test, can you create a simple spreadsheet and save it as a CSV. Then, use notepad to have a look at what it's written.