in reply to Problem adding long string to excel cell
I changed it so the code added the values to the cells one at a time like this:$range = $worksheet->Range(sprintf("%s%d:%s%d", 'A', $nRow, 'C', $nR +ow)); $range->{Value} = [@Params[0], $sTextData, @Params[2];
For some reason, this did the trick. I haven't gotten the exception anymore and the long text is now showing in the cell where as before it wouldn't get inserted. If anyone has a good explanation as to why this code makes that much of a difference I would be more than happy to listen.$range = $worksheet->Range(sprintf("%s%d", 'A', $nRow)); $range->{Value} = @Params[0]; $range = $worksheet->Range(sprintf("%s%d", 'B', $nRow)); $range->{Value} = $sTextData; $range = $worksheet->Range(sprintf("%s%d", 'C', $nRow)); $range->{Value} = @Params[2];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem adding long string to excel cell
by googleabc (Initiate) on Aug 03, 2010 at 07:43 UTC | |
|
Re^2: Problem adding long string to excel cell
by dasgar (Priest) on Aug 03, 2010 at 16:21 UTC |