Documentation Problem #10352 [NEW]: Worksheet::setPaper doesn't include example code

From: Date: Tue, 13 Mar 2007 13:49:06 +0000
Subject: Documentation Problem #10352 [NEW]: Worksheet::setPaper doesn't include example code
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-9518@lists.php.net to get a copy of this message
From: m8ram Operating system: linux Package version: PHP version: 5.2.0 Package: Documentation Bug Type: Documentation Problem Bug description: Worksheet::setPaper doesn't include example code Description: ------------ Worksheet::setPaper doesn't include example code The example code box is empty and the text doesn't make it clear this is a method of a worksheet object. The following code appears to work: <?php require_once 'Spreadsheet/Excel/Writer.php'; // Creating a workbook $workbook = new Spreadsheet_Excel_Writer(); // sending HTTP headers $workbook->send('test.xls'); // Creating a worksheet $worksheet =& $workbook->addWorksheet('My first worksheet'); //set paper size $worksheet->setPaper(9); // The actual data $worksheet->write(0, 0, 'Name'); $worksheet->write(0, 1, 'Age'); $worksheet->write(1, 0, 'John Smith'); $worksheet->write(1, 1, 30); $worksheet->write(2, 0, 'Johann Schmidt'); $worksheet->write(2, 1, 31); $worksheet->write(3, 0, 'Juan Herrera'); $worksheet->write(3, 1, 32); // Let's send the file $workbook->close(); ?> -- Edit bug report at http://pear.php.net/bugs/bug.php?id=10352&edit=11 --

« previous php.pear.doc (#9518) next »