Solved

Spreadsheet Application

Posted on 2006-11-20
11
323 Views
Last Modified: 2010-08-05
Hi

I am trying to develop a web application using Perl and CGI.
Step 1: The webapplication were data will be uploaded from spreadsheet to database using multiform upload.
Step 2: Read the spread sheet data and upload it to database.

if any one come across similar application please help me with sample code. This is first time I am working with spreadsheets.

Note: It is not a comma saperated file.It is a spreadsheet(excel file with formated columns

It would be great if artical explains me step by step process we need to follow to upload spreadsheet data to database.

Thanks

 
0
Comment
Question by:basirana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 17982621
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 500 total points
ID: 17982665
ozo.

Spreadsheet::Perl won't read excel spreadsheets.

For reading an Excel spreadsheet you need Spreadsheet::ParseExcel

http://search.cpan.org/~kwitknr/Spreadsheet-ParseExcel-0.2603/ParseExcel.pm

0
 

Author Comment

by:basirana
ID: 17982813
I am sorry but its a CPAN and it explains spread sheet module. Before that I need to upload the file.
How can I upload file from browser to the server were the perl program read the excel data.

Questions:
1.How to upload file?
2.How to read excel file and save the data to database?

Please help with running example.

Thanks
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:basirana
ID: 17982839
Is it possible we can upload file to database(BLOB)?
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 500 total points
ID: 17982891
To upload the file, use the CGI module upload function.

http://search.cpan.org/~lds/CGI.pm-3.25/CGI.pm#CREATING_A_FILE_UPLOAD_FIELD

Note that CGI is a standard Perl module, so you shouldn't need to install it.

To save the data to the database, use the DBI module and an associated DBD (Database Driver) module.

http://dbi.perl.org/
0
 

Author Comment

by:basirana
ID: 17983104
Bro I dont have ParseExcel.pl installed on the server so I cannot use Spreadsheet module.
Is there a way we can save the file to Database (BLOB).

Multipart file upload to ---> Database BLOB

Thanks
0
 

Author Comment

by:basirana
ID: 17983152
Bro I am bit confused this is my first application were I am using fileupload and spreadsheet. If anyone can explain me how the process goes were to start.
I think alread this kind of a application would have been used.

The problem is its a web application.

Please help me with good example gives me step by step process.

Thanks
0
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 17983185
The flow is:

1.  HTML form where user selects the Excel file to upload.
2.  Perl CGI script that uses the CGI upload functions to receive the Excel spreadsheet.
3.  The script then reads the spreadsheet with SpreadSheet::ParseExcel
4.  The script processes the data and loads it into the database via the DBI interface.

If you don't install the required modules, you are going to have a *very* difficult time in writing your own code to process it.
0
 

Author Comment

by:basirana
ID: 17984074
I will try tp install spreadsheet module bro.

Thanks
0
 

Author Comment

by:basirana
ID: 17984595
If you have sample code for file upload that would really helpfull.

Thanks
0
 
LVL 39

Expert Comment

by:Adam314
ID: 17988111
The sample code is on the documentation for the CGI module, at the link Tintin provided.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question