Help with excelsheet generation


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with excelsheet generation
# 1  
Old 03-04-2009
Help with excelsheet generation

Hi All,

i have around 50 queries in sybase.
We have a requirement where we need to write a unix script, which execute the query one by one & generate the excel sheet & send it to user.

I have completed half of the part, where i am executing query one by one & putting the result into a .txt file.

Can someone suggest me how to go for creating excelfile from text file?
# 2  
Old 03-04-2009
Just save it as a CSV file, and Excel will open it natively.
# 3  
Old 03-04-2009
It is coming in a single column. Following is a output. If i save it as a.csv file. It will copy both column in a single column. I need, that it should paste in separate (2) columns.

ex:
Volume As Of Day
----------------------- --------------------------
1 Dec 1 2066 12:00AM
2158827 Dec 9 2088 12:00AM
2234392 Dec 8 2088 12:00AM
2235573 Dec 5 2088 12:00AM
1821442 Dec 4 2088 12:00AM
2650401 Dec 3 2088 12:00AM
2790244 Dec 2 2088 12:00AM
2541708 Dec 1 2088 12:00AM
# 4  
Old 03-04-2009
Make your output use a comma as a field separator instead of a space. That's what makes it a CSV file, not the extension.
# 5  
Old 03-04-2009
I tried it using your output file and got the same result. When I put a comma
in the string between the first and second columns it seemed to work.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to extract jil file details in a excelsheet

I am very new to shell scripting. I have a autosys jil file that looks like :-- /* ------------- JOB1 ------------------ */ insert_job: JOB1 job_type: b owner: cm@pelonmuck permission: gx,ge,wx,we,mx,me date_conditions: 1 days_of_week: mo,tu,we,th,fr,su start_time: "18:30"... (9 Replies)
Discussion started by: newbie_shell
9 Replies

2. Shell Programming and Scripting

Help with file generation

Dear all Hope you are doing good. I've requirement where in I need to generate a file containing set of SQLs as per the inputs. My script flow is like reading few parameters using read command to read input to script and process the inputs. However at one of the input, my script has to... (3 Replies)
Discussion started by: tenderfoot
3 Replies

3. Shell Programming and Scripting

Perl : corrupted excelsheet while trying to open

Hi folks, I am trying to send the mail with spreadsheet attachment in perl.I am able to send the mail with xlsx attachment as well but not able to open the xlsx sheet.While opening the sheet I am receiving the corrupted message. Below is the code. use MIME::Lite; use Net::SMTP; ###... (1 Reply)
Discussion started by: scriptscript
1 Replies

4. Shell Programming and Scripting

Character generation

I need a (bash) script to echo to the screen all possible 4 character hex combinations of: A-F, 0-9. I beleive there are 65,535 approx combos. Output something like this: 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A ... ... FFFE FFFF (6 Replies)
Discussion started by: ajp7701
6 Replies

5. Shell Programming and Scripting

Graph generation

How can I generate graphs using perl in unix solaris environment? Please suggest. (2 Replies)
Discussion started by: wadhwa.pooja
2 Replies

6. Shell Programming and Scripting

Report generation

Hello, I got a requirement in writing a KSH script in unix, please help me out the requirement is there are two folders Folder1 and Folder2 and there are same files in the different folders. like file1,file2 in folder1 and file1 and file2 in folder2. I would like to compare all the similar... (3 Replies)
Discussion started by: gmahesh2k
3 Replies

7. UNIX for Dummies Questions & Answers

report generation

Hello, I got a requirement in writing a sheel script in unix, please help me out the requirement is there are two folders Folder1 and Folder2 and there are same files in the different folders. like file1,file2 in folder1 and file1 and file2 in folder2. I would like to compare all the... (2 Replies)
Discussion started by: gmahesh2k
2 Replies

8. Programming

Shellcode Generation using C

Hi, I was just learning about buffer overflow attacks... I was curious as to how to generate a simple shellcode. I've written two codes - One is the typical program that has a vulnerability inside and the other is the shellcode. main program: void test(); int main() { test(); ... (2 Replies)
Discussion started by: Legend986
2 Replies
Login or Register to Ask a Question