Excel file attachment showing data in single column


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Excel file attachment showing data in single column
# 1  
Old 05-29-2012
Excel file attachment showing data in single column

Hi All, found similar posts, but not exatcly what i wanted.

I have an text file like below and am trying to send mail as an excel file but when i get the excel file as the attachment, all the data is coming in the first column. I need below data in 4 columns.

Unix file
Code:
Name,ID,Trade,Date
DY37,2,19337,20120523

am getting excel file as below
Code:
 Name,ID,Trade,Date DY37,2,19337,20120523

Need the excel file as below
Code:
 Name ID Trade Date DY37 2 19337 20120523



Can someone please help me.

---------- Post updated at 07:39 PM ---------- Previous update was at 05:14 PM ----------

xls foramt didnt work, used csv

Last edited by Franklin52; 05-29-2012 at 03:25 AM.. Reason: Please use code tags
# 2  
Old 05-29-2012
You have 2 options.
Option 1: Open the file then go to menu DATA --> Text to Column. Follow simple instructions and will see the data in your format.

Option 2: Replace the comma's with Tab before you send an attachment in mail. Once you click the attachment, you will see the data in your format.

HOpe it will help you.
# 3  
Old 05-29-2012
Looks to me like the file is in unix format and Excel probably wants a DOS formatted file.

Convert the file to DOS format before attaching to you email. To do this you can use unix2dos (if you OS supports it):
Code:
unix2dos yourfile.csv

Or use this command if you don't have unix2dos:
Code:
sed 's/$/'`printf "\015"`/ yourfile.csv > yourfile_fixed.csv

# 4  
Old 08-30-2012
Hello,

I'm having a mail with a .csv attachment. I need to extract this attachment & store it in a text file.

Any ideas are really appreciated.

Thanks.

Moderator's Comments:
Mod Comment Please start your own thread and do not hijack other threads.
This thread is over 3-months old and bears no relation to your post.

Please remember to post what Operating System and version you are running and what Shell you use.
In this context, please describe your mail client.

Last edited by methyl; 09-01-2012 at 10:20 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to copy a column of multiple files and paste into new excel file (next to column)?

I have data of an excel files as given below, file1 org1_1 1 1 2.5 100 org1_2 1 2 5.5 98 org1_3 1 3 7.2 88 file2 org2_1 1 1 2.5 100 org2_2 1 2 5.5 56 org2_3 1 3 7.2 70 I have multiple excel files as above shown. I have to copy column 1, column 4 and paste into a new excel file as... (26 Replies)
Discussion started by: dineshkumarsrk
26 Replies

2. UNIX for Beginners Questions & Answers

How to insert data into black column( Secound Column ) in excel (.XLSX) file using shell script?

Source Code of the original script is down below please run the script and try to solve this problem this is my data and I want it column wise 2019-03-20 13:00:00:000 2019-03-20 15:00:00:000 1 Operating System LAB 0 1 1 1 1 1 1 1 1 1 0 1 (5 Replies)
Discussion started by: Shubham1182
5 Replies

3. Shell Programming and Scripting

Tabbed multiple csv files into one single excel file with using shell script not perl

Hi Experts, I am querying backup status results for multiple databases and getting each and every database result in one csv file. so i need to combine all csv files in one excel file with separate tabs. I am not familiar with perl script so i am using shell script. Could anyone please... (4 Replies)
Discussion started by: ramakrk2
4 Replies

4. UNIX for Beginners Questions & Answers

Excel attachment in e-mail

i am trying to get an SQL output into an excel attachment and the other output into mail body as excel format. i am getting the excel format in the mail body, but i am not getting the excel attachment. and the output is coming in one cell in the excel. is it possible to get the excel output with... (11 Replies)
Discussion started by: maddelav
11 Replies

5. Shell Programming and Scripting

Paste 2 single column files to a single file

Hi, I have 2 csv/txt files with single columns. I am trying to merge them using paste, but its not working.. output3.csv: flowerbomb everlon-jewelry sofft steve-madden dolce-gabbana-watchoutput2.csv: http://www1.abc.com/cms/slp/2/Flowerbomb http://www1.abc.com/cms/slp/2/Everlon-Jewelry... (5 Replies)
Discussion started by: ajayakunuri
5 Replies

6. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

7. Shell Programming and Scripting

Filter more data in single column

Hi All, One of my source file column name RelationshipNumber. I need to filter below mentioned records in RelationshipNumber column. RelationshipNumber: S45678 D89763 Y09246579 A91234 If it is available in above mentioned column, then I need to print the entire line from my source... (2 Replies)
Discussion started by: suresh_target
2 Replies

8. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

All, I have an excel sheet Excel1.xls that has some entries. I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls These may be in different workbooks. They are totally independent made by 2 different users. I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies

9. Windows & DOS: Issues & Discussions

Split Data in one column into 2 column in Excel using DOS or VBScript

Hi I have some data in my Excel File.However all the data is in one single column.I want to split it into two columns. Current Data: 1,Hi Everyone,I am 7,New To Dos,And 17,VB Script,i could 110,have tried this thing 1800,in UNIX Desired Output CELL1|CELL 2 1 |Hi... (3 Replies)
Discussion started by: dashing201
3 Replies

10. UNIX for Dummies Questions & Answers

Excel attachment in e-mail

Hi, I have to send the query output as an excel attachmet from UNIX Shell script, for this i have written following shell script and sql file this shell script has created the ho.xls file with correct query output but it doesn't generate the mail that shold contain query output as an excel... (5 Replies)
Discussion started by: karthikeyanjo
5 Replies
Login or Register to Ask a Question