travel/service/vendor/mk-j/php_xlsxwriter/examples/ex11-right-to-left.php

20 lines
447 B
PHP

<?php
set_include_path( get_include_path().PATH_SEPARATOR."..");
include_once("xlsxwriter.class.php");
$header = array(
'c1-text'=>'string',//text
'c2-text'=>'@',//text
);
$rows = array(
array('abcdefg','hijklmnop'),
);
$writer = new XLSXWriter();
$writer->setRightToLeft(true);
$writer->writeSheetHeader('Sheet1', $header);
foreach($rows as $row)
$writer->writeSheetRow('Sheet1', $row);
$writer->writeToFile('xlsx-right-to-left.xlsx');