Re: Spreadsheet Writer cell sizes

From: Date: Wed, 04 May 2005 20:02:02 +0000
Subject: Re: Spreadsheet Writer cell sizes
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19071@lists.php.net to get a copy of this message
Thanks to this list, I found and used the following code to allow me to write strings longer than 255 characters to XL spreadsheet cells with the Spreadsheet_Excel_Writer package: $workbook->_codepage = '1250'; $workbook->setVersion(8); * note that I'm using codepage 1250 rather than 1251, as some of the data I'm dealing with includes accented characters which weren't displaying properly with codepage 1251 The problem I'm having now is with some particularly long strings. One in particular, are two paragraphs separated by three linebreaks that add up to a total of 1345 characters. All of the characters are in the cell, which you can see by clicking the cell, but when the cell does not have focus, only the first 1165 characters are actually visible, even though the cell is sized such that there is room for the remaining characters to display. Has anyone else encountered this? Does anyone have any ideas on how to fix it? Thanks. Will Killian On Nov 12, 2004, at 4:44 PM, James Marrs wrote:
Justin Patrin wrote:
On 12 Nov 2004 07:00:23 -0000, PHPDiscuss - PHP Newsgroups and mailing lists <lliddell@cs.up.ac.za> wrote:
Hi everyone I have been using the PEAR Spreadsheet writer to dynamically generate an Excel spreadsheet for download. I have 2 problems: 1. The data I insert into the cells consists of a string of data containing a number of '\n' characters. I have set the cell sizes, but they do not expand to that size automatically. Rather, they stay at the size of a normal 1-lined cell and I have to click on the data in the cell to have it to expand the cell to fit the data. How can I fix this? 2. Some of the data I want to write to a cell is longer than 255 characters. Is there a way getting around the 255 character limit?
I *think* that using the "new experimental" format will do this, but you'll have to hunt for the ay to do it (look at the source).
We're getting around the 255 char limit with these calls: $workbook->_codepage = '1251'; $workbook->setVersion(8); So far, no problems... James Marrs -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.general (#19071) next »