Grafische gevorderde |
|
Het belangrijkste gedeelte heb ik al af, namelijk dit:
require_once 'Spreadsheet/Writer.php';
// We give the path to our file here
$workbook = new Spreadsheet_Excel_Writer('test.xls');
// Creating the format
$format_title =& $workbook->addFormat(array('Size' => 10,
'Align' => 'center',
'BgColor' => '#EFEFEF'));
$format_title->setBold();
$worksheet =& $workbook->addWorksheet('Provinces');
$worksheet->setColumn(0,4,20);
$worksheet->write(0, 0, 'Tag', $format_title);
$worksheet->write(0, 1, 'Province', $format_title);
$worksheet->write(0, 2, 'ID', $format_title);
$worksheet->write(0, 3, 'Networth', $format_title);
$worksheet->write(0, 4, 'Days of Inactivity', $format_title);
$worksheet->write(1, 0, 'True');
$worksheet->write(1, 1, 'BladiN');
$worksheet->write(1, 2, '241786');
$worksheet->write(1, 3, '800000');
$worksheet->write(1, 4, 0);
// We still need to explicitly close the workbook
$workbook->close();
require_once 'Spreadsheet/Writer.php'; // We give the path to our file here $workbook = new Spreadsheet_Excel_Writer('test.xls'); // Creating the format $format_title =& $workbook->addFormat(array('Size' => 10, 'Align' => 'center', 'BgColor' => '#EFEFEF')); $format_title->setBold(); $worksheet =& $workbook->addWorksheet('Provinces'); $worksheet->setColumn(0,4,20); $worksheet->write(0, 0, 'Tag', $format_title); $worksheet->write(0, 1, 'Province', $format_title); $worksheet->write(0, 2, 'ID', $format_title); $worksheet->write(0, 3, 'Networth', $format_title); $worksheet->write(0, 4, 'Days of Inactivity', $format_title); $worksheet->write(1, 0, 'True'); $worksheet->write(1, 1, 'BladiN'); $worksheet->write(1, 2, '241786'); $worksheet->write(1, 3, '800000'); $worksheet->write(1, 4, 0); // We still need to explicitly close the workbook $workbook->close();
Alleen nu wil ik het zo maken dat ik van iedere col apart de width kan zetten.. hoe moet dit?
|