Read data from excel and upload into html page


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Read data from excel and upload into html page
# 1  
Old 11-25-2015
Read data from excel and upload into html page

Hi,

I have requirement for automation, wanna confirm whether is it possible in shell scripting.

1) Need to read data from excel sheet
2) And upload the details in html page

I know first requirement is possible by converting excel into csv form, but not sure about the second one.

If not in shell script, let me know in which language is easy to make the requirement possible. Please help me on this.
# 2  
Old 11-25-2015
Well, 1) can be done - with a .csv file (although a perl module exists to deal with EXCEL binary data), and 2) as well, if with "upload" you mean outputting HTML shaped data into an .html file.
There are quite some threads in these fora covering this.
# 3  
Old 11-25-2015
2) I have html front end page, so the data should upload into the front end application
# 4  
Old 11-25-2015
This is by no means perfect, but if you have fairly simple csv.... consider:

Code:
sed -e '1s:^:<table border=1><tr><th>:' \
-e '1s:,:</th><th>:g' \
-e '1s:$:</th></tr>:' \
-e '2,$s:^:<tr><td>:' \
-e '2,$s:,:</td><td>:g' \
-e '2,$s:$:</td></tr>:' \
-e '$a </table>'

# 5  
Old 11-25-2015
I got some idea for the first requirement but can someone help for the second part (uploading data into html page)
# 6  
Old 11-26-2015
Code:
echo "<html><body><table><tr><td>Field 1</td><td>Field 2</td></tr>" > output.html
while IFS=; read field1 field2;do echo "<tr><td>$field1</td><td>$field2</td></tr>" >> output.html;done < input.csv
echo "</body></html>" >> output.html

hth
# 7  
Old 11-26-2015
Is 2nd part is to upload date into HTML form application? If yes then it can be done in Perl using Mechanize or selenium based on complexity of your front end
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Html upload file to bash script

I am trying to upload a file to the server using bash script in html form. <FORM NAME="FORM1" METHOD="post" enctype="multipart/form-data" ACTION="/cgi-bin/UPLOAD.sh"> <INPUT type="file" name="DOCFILE" id="DOCFILE" accept=".jpg,.tif,.pdf"> </FORM> How can I able to access the file in... (8 Replies)
Discussion started by: Naz
8 Replies

2. Programming

Sql developer how to upload the excel sheet in Oracle table

I have some records to be updated in oracle table. I am using sql developer tool. could any one tell me how to update those records in oracle table. I am having excel sheet with those records. (4 Replies)
Discussion started by: ramkumar15
4 Replies

3. Shell Programming and Scripting

HTML code upload text file grep through shell script

I am looking for HTML code that browse text file and grep with database file then retrieve result txtfileuploaded contain 112233 115599 113366 shell code grep -F -f txtfileuploaded /data/database.txt result 112233 Mar 41$ 115599 Nov 44$ 113366 Oct 33$ attached... (2 Replies)
Discussion started by: phpshell
2 Replies

4. Shell Programming and Scripting

pass argument to html upload form

I am using an html form and a php upload script to upload files. HTML form <table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <td> <table... (1 Reply)
Discussion started by: anil510
1 Replies

5. Emergency UNIX and Linux Support

Grab total page read from webalizer display in html

Hi, I need a way to grab the total combines since inception, total pages read from webalizer on my centos server or any other location (as long as since inception) and display the result live on my website So with each visit it would be increasing, or perhaps live (ajax) not sure But can... (0 Replies)
Discussion started by: lawstudent
0 Replies

6. Shell Programming and Scripting

How to pass data from server (CGI script) to client (html page)

Hi I know how to pass data from client side (html file) to server using CGI script (POST method). I also know how to re-create the html page from server side after receiving the data (using printf). However I want to write static pages on client side (only the structure), and only to pass... (0 Replies)
Discussion started by: naamabm
0 Replies

7. Linux

Read data of a page frame (linux) make freeze the system

Hello, I'm writing a linux driver that reading the data of a page frame of an process. But when I use it, it make immediately freeze the system. Can you help me? Thank for reading my question! system: Ubuntu 9.04, kernel 2.6.28.15, Intel Duo static int read_addr(int pid, unsigned long... (2 Replies)
Discussion started by: hahai
2 Replies

8. Shell Programming and Scripting

upload excel file contents to server

Hi I have an excel file with only 5 rows .I want to uplaod those 5 rows to a database using a shell script.Is this possible.If so where do i start. Thnks (1 Reply)
Discussion started by: magikminox
1 Replies

9. UNIX for Advanced & Expert Users

how to read the data from an excel sheet and use those data as variable in the unix c

I have 3 columns in an excel sheet. c1 c2 c3 EIP_ACCOUNT SMALL_TS_01 select A.* from acc; All the above 3 col shoud be passed a variable in the unix code. 1.How to read an excel file 2.How to pass these data as variable to the unic script (1 Reply)
Discussion started by: Anne Grace
1 Replies

10. UNIX for Dummies Questions & Answers

Excel to Html

Hi, How to convert excel to html in shell prompt Is there any unix command to do this ? Vinay (1 Reply)
Discussion started by: msvinaykumar
1 Replies
Login or Register to Ask a Question