[RESOLUTION] -- Spreadsheet Excel Writer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yesterday I wrote a request for some help with setting the column width
when exporting a php generated 

page to Excel. After further research I was able to find setColumn().
There were some that asked

what I was able to come up with when using this feature since the
documentation is incomplete.

 

For those of you that are using the Spreadsheet Excel Writer with Pear
and PHP use the following

to set the width of a column...

 

// Creating a workbook

$workbook = new Spreadsheet_Excel_Writer();

 

//Setting column width

$worksheets1->setColumn(0,0,10.00);

 

This example breakdown as follows...

 

setColumn(0,0,10.00) == the first column to be affected by the width

setColumn(0,0,10.00) == the last column to be affected by the width

setColumn(0,0,10.00) == the width as a float

 

The setColumn() needs to be set before any data is being written to the
spreadsheet. If you only 

wont one column to be affected by the setColumn() then you set the first
and last column

values to the same column number. If you want to affect more than one
column you can set the

last column to the desired column number, just remember the column
numbering begins with a 0.

 

 

 

 

Jef Sullivan

J-MAC & AutoAir

3520 South State Street

Salt Lake City, UT  84115

801-269-2030 - Telephone

801-269-2065 - Fax

 

 

 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux