Variables being set to GENERAL

G

gcook

Hi,

I've got an old perl program running on my webserver - so old that I
haven't used a perl programmer in about two years :) (we've gone all php
for a variety of reasons). Anyway, I'm stumbling on a problem that I am
almost certain is a problem with my inputs to the script. The program
has a debug mode that is giving me some very weird results.

Here's what the script does: It takes a spreadsheet like this:
Column1 Column2 Column3
val1 val2 val3
val4 val5 val6

and then one at a time (one per row) builds a url like this:
www.somedomain.com/anotherscript.pl?Column1=val1&Column2=val2&Column3=val3
(i.e. it builds a GET statement with name-value pairs, where name=column
heading and value=value from the cell)

All is well - except I have one spreadsheet where I end up with a bunch
of the values not equalling what is in the spreadsheet, but instead
being set to 'GENERAL'. It seems it hits a specific column, and every
value after that column, for all rows, is set to GENERAL, for all rows.
i.e.
www.somedomain.com/anotherscript.pl?Column1=val1&Column2=GENERAL&Column3=GENERAL

As I said, I'm sure the problem is something bizarre in the inputs, like
a space we're not checking for or something - but the GENERAL value I'm
hoping will tell me where to look.

I don't see the word 'GENERAL' in the script anywhere :). Here's the
includes from the top of the script:
use strict;
use CGI;
use CGI::Carp 'fatalsToBrowser';
use Spreadsheet::parseExcel;
use Spreadsheet::WriteExcel::Big;
use LWP::Simple;
use MIME::Lite;

Anyone care to wager a guess or give me a shove in the right direction
as to what might be causing the script to set a value to 'GENERAL'? I
suspect one of the libraries is kicking out the 'GENERAL', but don't
know enough to venture a guess as to which one, or under what conditions.

Thanks!
 
J

Jim Gibson

Hi,

I've got an old perl program running on my webserver - so old that I
haven't used a perl programmer in about two years :) (we've gone all php
for a variety of reasons). Anyway, I'm stumbling on a problem that I am
almost certain is a problem with my inputs to the script. The program
has a debug mode that is giving me some very weird results.

Here's what the script does: It takes a spreadsheet like this:
Column1 Column2 Column3
val1 val2 val3
val4 val5 val6

and then one at a time (one per row) builds a url like this:
www.somedomain.com/anotherscript.pl?Column1=val1&Column2=val2&Column3=val3
(i.e. it builds a GET statement with name-value pairs, where name=column
heading and value=value from the cell)

All is well - except I have one spreadsheet where I end up with a bunch
of the values not equalling what is in the spreadsheet, but instead
being set to 'GENERAL'. It seems it hits a specific column, and every
value after that column, for all rows, is set to GENERAL, for all rows.
i.e.

www.somedomain.com/anotherscript.pl?Column1=val1&Column2=GENERAL&Column3=GENER
AL

As I said, I'm sure the problem is something bizarre in the inputs, like
a space we're not checking for or something - but the GENERAL value I'm
hoping will tell me where to look.

I don't see the word 'GENERAL' in the script anywhere :). Here's the
includes from the top of the script:
use strict;
use CGI;
use CGI::Carp 'fatalsToBrowser';
use Spreadsheet::parseExcel;
use Spreadsheet::WriteExcel::Big;
use LWP::Simple;
use MIME::Lite;

Anyone care to wager a guess or give me a shove in the right direction
as to what might be causing the script to set a value to 'GENERAL'? I
suspect one of the libraries is kicking out the 'GENERAL', but don't
know enough to venture a guess as to which one, or under what conditions.

GENERAL sounds like an Excel format specification, the default one.
Perhaps your program is reading cell format specifications where it is
expecting cell contents. Unfortunately, I have not used the
Spreadsheet::parseExcel module, but I would look at the code that
fetches the cell contents from the spreadsheet. I couldn't find the
string 'GENERAL' in the Spreadsheet modules, and none of the others are
likely to be the cause of your problem.

If you can't figure it out, then you should post a short-as-possible
program that illustrates the problem. Unfortunately, your problem
depends upon your spreadsheet, which is difficult to post.

This newsgroup is defunct. You should post on comp.lang.perl.misc for
general Perl questions and on comp.lang.perl.modules for problems with
modules, such as you seem to be having. Please read the guidelines for
posting on those groups before posting, however, as it can make a big
difference in the quality of help you will receive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top