For loop output to excel file


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers For loop output to excel file
# 1  
Old 09-15-2019
For loop output to excel file

Hi, I have a shell script which analyses the log folder for a specific string and throws me the output. I have used for loop since it does this in multiple servers. Now I want to save the output in a excel in the below format. Can someone please help?

The output which I get
Code:
Server1 : count
Server2 : count
.
.
.
Server7 : count

The output format which I want in a excel is
Code:
Server1   server2     server3 ...... server7
Count       count        count   ......  count

I want this output as columns in excel

Last edited by Scrutinizer; 09-15-2019 at 03:41 PM..
# 2  
Old 09-15-2019
You could transpose the rows and columns, there are many examples on these forums and import into excel as a csv file

or:
Have you tried the pivot function when pasting in Excel?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Echo For ... Loop output into a file

Hi, All: I have one for ... loop code to generate a list of rename statement. However, echo the loop output on screen is OK. But store the echo output into a file is not working. So come here to seek help. My basic code is: ! /bin/ksh echo > DAS_VetFed.txt dir=/mydirectory cd $dir files=`ls... (6 Replies)
Discussion started by: duke0001
6 Replies

2. UNIX for Beginners Questions & Answers

Shell script, For loop output to excel as columns

Hi, I have a shell script which analyses the log folder for a specific string and throws me the output. I have used for loop since it does this in multiple servers. Now I want to save the output in a excel in the below format. Can someone please help? The output which I get Server1 : count... (14 Replies)
Discussion started by: srilaxman
14 Replies

3. 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

4. UNIX for Dummies Questions & Answers

How to extract UNIX output to excel CSV file?

Hi guys - I have a file and output like this below: File: myfile.dat File has content like this: ABCD, 34, 456, 2324 I would like excel to have this: Name (ABCD) Quantity (34), Type (456), Status (2324) (Name, Quantity, Type and Status are columns) I would like to export... (4 Replies)
Discussion started by: DallasT
4 Replies

5. 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

6. Homework & Coursework Questions

Loop to Convert a list from an input file and output it to another file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A) Write a script, which will take input from a file and convert the number from Centigrade to Fahrenheit... (5 Replies)
Discussion started by: AliTheSnake
5 Replies

7. Shell Programming and Scripting

Writing excel file using perl : Excel file formatting changed

I am trying to create a program where user can input data in certain excel cells using user interface on internet....the programming is on perl and server is unix But when i parse data into excel the formatting of sheets is turned to default and all macro coding removed. What to do...Please... (7 Replies)
Discussion started by: mud_born
7 Replies

8. Shell Programming and Scripting

Help to get the Output of PL/SQL procedure In a Excel or Text File

Hi, Could anyone please guide me to get the output of the PL/SQL procedure in a Excel file or Text File... Thanks (1 Reply)
Discussion started by: funonnet
1 Replies

9. Windows & DOS: Issues & Discussions

Output Of FIND command in dos to Excel File.

Hi I want to export DOS output of find command in Excel. However I want information to be in different column and not in same. I am using this command set /p String_to_search='Enter String to search !' set /p File_to_search='Enter File to search !' findstr /N "%String_to_search%"... (0 Replies)
Discussion started by: dashing201
0 Replies

10. Shell Programming and Scripting

oracle query output in excel file

Hi All, I have seen many examples of spooling query output in csv file. But I want to spool the query results in proper excel file. Can you guys help me on this? (4 Replies)
Discussion started by: yabhi_22
4 Replies
Login or Register to Ask a Question