By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,665 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,665 IT Pros & Developers. It's quick & easy.

Variables being set to GENERAL

P: n/a
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:
http://www.somedomain.com/anotherscr...2&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.
http://www.somedomain.com/anotherscr...olumn3=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!
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <42******@news.sentex.net>, gcook <gl***@glenn.ca> wrote:
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:
http://www.somedomain.com/anotherscr...2&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.

http://www.somedomain.com/anotherscr...&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.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.