Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: can you help with Spreadsheet::WriteExcel module?

by poj (Parson)
on Jun 06, 2012 at 07:18 UTC ( #974663=note: print w/replies, xml ) Need Help??

in reply to can you help with Spreadsheet::WriteExcel module?

Why do you have a loop within the elsif block. ?
For every non-match it will write out all the records
for my $row (1..$row_max){ my $valA = $sheet->{Cells}[$row][0]->{Val}; my $valB = $sheet->{Cells}[$row][1]->{Val}; # ... $worksheet1->write ($write_row, 0, "$valA"); $worksheet1->write ($write_row, 1, "$valB"); $write_row++; # ... }
my $write_row = 1; for my $row (1..$row_max){ my $valA = $sheet->{Cells}[$row][0]->{Val}; my $valB = $sheet->{Cells}[$row][1]->{Val}; # does this value exist in Col D if (exists $colD{$valA}) { my $xlrow = $row+1; print FILE "price change [A$xlrow]=[D$colD{$valA}] Value=$valB\n"; } else { # ... $worksheet1->write ($write_row, 0, "$valA"); $worksheet1->write ($write_row, 1, "$valB"); $write_row++; # ... } }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://974663]
[Corion]: erix: Well, they also seem to have changed the server, or some software, or whatever, and seem to be in the process of changing the DB schema from having the "username" as primary key to something else.
[Corion]: Far too many things being done at once, or maybe only now has it become apparent that nobody knows that piece of software anymore
[marto]: good morning all
[Corion]: I consider having an abstract key as userid in your system good, because the "real" company-wide (or even larger) user id will likely not fit your criteria well
[Corion]: A good morning marto!

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-01-23 09:40 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (192 votes). Check out past polls.