PHP Spreadsheet Excel Writer

Configurare noua (How To)

Situatie

Spreadsheet_Excel_Writer is a library written in PHP which helps to read from and write to different types of spreadsheet file formats with the help of given set of classes.

Solutie

<?php

// require_once ‘Spreadsheet/Excel/Writer.php’;

// Creating a workbook
$workbook = new Spreadsheet_Excel_Writer();

// Sending HTTP headers
$workbook->send(‘gfg1.xls’);

// Creating a worksheet
$worksheet =& $workbook->addWorksheet(‘1st Worksheet’);

// The actual data
$worksheet->write(0, 0, ‘test’);
$worksheet->write(0, 1, ‘test2’);
$worksheet->write(1, 0, ‘test test test test test’);
$worksheet->write(1, 1, ‘test test test’);

// Let’s send the file
$workbook->close();
?>

Tip solutie

Permanent

Voteaza

(4 din 11 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?