Mark Martin wrote:
Hi,
I've got a web form that allows a user to browse to an excel file on their computer 
and input it and the year as parameters to run a perl script

FORM :

<input type="file" value="excel" name="file" size="15">


How do you know that the filename will be less than 16 characters?


<input type="text" name="year" size="15">

SCRIPT:

use CGI;
use Spreadsheet::ParseExcel;
$q=new CGI;

my $oExcel = new Spreadsheet::ParseExcel;
my $user_ssheet=$q->param('file');
my $oBook = $oExcel->Parse($user_ssheet);
my $year=$q->param('year');

BUT I keep getting a "HTTP 500 - Internal server error". However if I hard code in the reference to the excel file, like so :


Have you tried using "fatalsToBrowser"
Also, what does your server logs say about the error?


my $user_ssheet="excel_file.xls";

it works fine !? Is it something to do with paths from the fiel input type?

Likely something to do with CGI and Server PATH interaction. Also, there is a beginners-cgi group which covers Perl CGI programming.


-Bill-
__Sx__________________________________________
http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to