in reply to read xls file using Perl program

Your example code indicates that you want the perl program to be running on a web server. Please clarify what you want to do; Is the file you want to load on the server or on the client machine that is running the web browser?

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

Replies are listed 'Best First'.
Re: Re: read xls file using Perl program
by Anonymous Monk on Dec 16, 2003 at 18:17 UTC
    Hi freddo411
    Yes ... Thankns for your comment. I want to run the perl program in web server. The xls,html and perl program should be kept in server. Need a perl program that work under Linux and output will be shown in the browser.
    Thanks
    Regards
    Dan
      You want to pre-populate these input fields with data from the web server side. The previous poster gave you a pointer to a way to read the data from an excel file. You might also save yourself some trouble and save the file as text formated as .csv or tab seperated data. In that case you can have perl easily read the file and parse the data into variables.

      Pre-populating an HTML for can be done using HTML::FillInForm. The code can be as simple as:

      ... code to read in or create your $page ... code to read in your excel data and format into a hashref called $ +dbrecord # fill in the user input forms with dbrecord data use HTML::FillInForm; my $fif = new HTML::FillInForm; my $out_page = $fif->fill( scalarref => \$page, fdat => $dbrecord);

      -------------------------------------
      Nothing is too wonderful to be true
      -- Michael Faraday