Perl programmers?

Please use this forum to ask our resident IT geeks advice.
Post Reply
User avatar
Lucazade
Posts: 24
Joined: Fri Aug 09, 2002 2:45 pm
Location: Cambridge, England
Contact:

Perl programmers?

Post by Lucazade »

As nobody has used this part of the forum yet, here's a question: I am trying to use the ParseExcel function in a web page but I cannot get the data from the spreadsheet. I am not getting error messages, but nothing appear.

Any idea?
-- Luca.
----------------------
Second-hand bike parts:
http://www.aboutbikes.co.uk
User avatar
firestorm996
Posts: 617
Joined: Tue Jul 16, 2002 10:15 am
Location: Oop North
Contact:

Post by firestorm996 »

I haven't used Perl myself, but certain problems and techniques are common throughout different languages.

Try to find another function which can be used to verify whether any data is being returned or not. There is probably a .Recordcount equivalent, or maybe a way to dump the returned data to screen.

If Perl uses an ODBC connection to the excel spreadsheet you could use Access to link it as a table, via the same ODBC connection. That way you can verify that ODBC is configured and running correctly.
Firestorm996
'98 VTR in black - road whore - track bitch
User avatar
Lucazade
Posts: 24
Joined: Fri Aug 09, 2002 2:45 pm
Location: Cambridge, England
Contact:

Post by Lucazade »

Woosh!

I'm not that good at programming yet. Maybe's time to dig that book and start again ...
-- Luca.
----------------------
Second-hand bike parts:
http://www.aboutbikes.co.uk
User avatar
firestorm996
Posts: 617
Joined: Tue Jul 16, 2002 10:15 am
Location: Oop North
Contact:

Post by firestorm996 »

Well Perl probably returns data as a recordset (literally a set of records!) which will probably have properties, just as a file has properties in windows. If you can print this value to screen it will help you to determine whether data is being retrieved or not.

ODBC is Open DataBase Connection, a universal standard in data transfer between one system and another. But it sounds like you're not using that here, so I'll shut up about it. :mrgreen:

Btw m8, do you still want to have a quick shufty at my site and see if it can be easily made mac/netscrape compatible?
Firestorm996
'98 VTR in black - road whore - track bitch
User avatar
Lucazade
Posts: 24
Joined: Fri Aug 09, 2002 2:45 pm
Location: Cambridge, England
Contact:

Post by Lucazade »

firestorm996 wrote:Well Perl probably returns data as a recordset (literally a set of records!) which will probably have properties, just as a file has properties in windows. If you can print this value to screen it will help you to determine whether data is being retrieved or not.
That's exactly the problem: no data output and no error messages. Starting to p*ssing me off...
firestorm996 wrote:Btw m8, do you still want to have a quick shufty at my site and see if it can be easily made mac/netscrape compatible?
Could do, but I make no promises. Considering the amount of JS and CSS you have used, it might be impossible to modify without removing some functionality. I'll have a go anyway, no prob.
-- Luca.
----------------------
Second-hand bike parts:
http://www.aboutbikes.co.uk
User avatar
firestorm_al
Site Admin
Posts: 756
Joined: Mon May 20, 2002 9:56 am
Location: Aberdeen (Scotland - UK)
Contact:

Post by firestorm_al »

Does your excel file have more than one worksheet??


http://search.cpan.org/dist/Spreadsheet ... seExcel.pm
User avatar
Lucazade
Posts: 24
Joined: Fri Aug 09, 2002 2:45 pm
Location: Cambridge, England
Contact:

Post by Lucazade »

firestorm_al wrote:Does your excel file have more than one worksheet??
Yes, but it shoould select the first one:

# select worksheet number 1 (you can also select a worksheet by name)
my $Sheet = $Book->Worksheets(1);
-- Luca.
----------------------
Second-hand bike parts:
http://www.aboutbikes.co.uk
User avatar
firestorm_al
Site Admin
Posts: 756
Joined: Mon May 20, 2002 9:56 am
Location: Aberdeen (Scotland - UK)
Contact:

Post by firestorm_al »

# select worksheet number 1 (you can also select a worksheet by name)
my $Sheet = $Book->Worksheets(1);
Try -

$Sheet = $Book->{Worksheet}[1];


Neil, I just ran your style sheet through TopStyle's style checker function and it's come up with a list of possible errors and compatibility problems as long as my arm! 8O
User avatar
firestorm996
Posts: 617
Joined: Tue Jul 16, 2002 10:15 am
Location: Oop North
Contact:

Post by firestorm996 »

Al

Why am I not surprised! :biggrin

I'm pretty new to this java/css stuff so once it worked I left it like that.

Does it give any indicators on what to change to improve compatibility?

Got any javascript validators? :whatever
Firestorm996
'98 VTR in black - road whore - track bitch
User avatar
Lucazade
Posts: 24
Joined: Fri Aug 09, 2002 2:45 pm
Location: Cambridge, England
Contact:

Post by Lucazade »

firestorm_al wrote: Try -

$Sheet = $Book->{Worksheet}[1];
Global symbol "$Sheet" requires explicit package name at ..."

*However*, I run the script from the command prompt after some more tweaking and finally got some results. Now I just need to find out why the html code is not showing the output ...
-- Luca.
----------------------
Second-hand bike parts:
http://www.aboutbikes.co.uk
User avatar
firestorm_al
Site Admin
Posts: 756
Joined: Mon May 20, 2002 9:56 am
Location: Aberdeen (Scotland - UK)
Contact:

Post by firestorm_al »

Lucazade wrote:
firestorm_al wrote: Try -

$Sheet = $Book->{Worksheet}[1];
Global symbol "$Sheet" requires explicit package name at ..."

*However*, I run the script from the command prompt after some more tweaking and finally got some results. Now I just need to find out why the html code is not showing the output ...
my $Excel = new Spreadsheet::ParseExcel;
my $Book = $Excel->Parse('Excel/ExcelFile.xls');
my($Sheet);
Post Reply