data from html to excel in linux

Closed
poem - Mar 20, 2010 at 11:36 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 23, 2010 at 08:09 AM
Hello
I've a shell script which generates a html file in each iteration.I want to get 3 values from the html file to be merged in one xcel file sequentially.for example 100 iteration the data will be written in one xcel file in 100 rows and 3 columns from those 100 html files.Can anyone help me to sort this out??

7 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 21, 2010 at 03:36 PM
Most easy way would be instead of excel file, create a CSV file. CSV files are by default opened by excel
0
How to do that?
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 21, 2010 at 07:03 PM
I guess you are using a bash scripts that is creating html file. You create CSV file in same way. It is just a text file that has extension csv. The columns are comma delimited and it would be better if you enclose each field with in ""
so like
"column 1", "column 2", "column 3"
0
Thanks a lot .Well I need some more help to sort it out.As I've stated previously I am generating the html files within a loop, each time I generate the csv file it'll override the previous one and i dont want to have the data in several csv file.Is there any procedure that the csv file will merge the data sequentially?
0

Didn't find the answer you are looking for?

Ask a question
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 21, 2010 at 08:29 PM
what script you are using to create the files ? Is it a regular bash or some thing else. You can echo the column to new file
some thing like

echo 'this is examlple' >> myfile.csv

>> is to append to the file as > is to overwrite
0
Yap it's working.I am just writing the output of a function to the csv file .The output of the function is like
"
Capturing coverage data from appdir
Found gcov version: 4.3.3
Scanning appdir for .gcda files ...
Found 1 data files in appdir
Processing tcas.gcda
Finished .info-file creation
Overall coverage rate:
lines......: 46.2% (30 of 65 lines)
functions..: 33.3% (3 of 9 functions)
branches...: 7.6% (5 of 66 branches)
"
Can I capture only the values 46.2%, 33.3% and 7.6% in the csv file?
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 23, 2010 at 08:09 AM
I do not have access to a linux or unix box any more. How ever from what I can tell

can you direct these lines to a temp file ? Then you can use cat and grep do the the work
0