Closed geeflaxx closed 1 year ago
I can help you in question 2.
<?php
include_once("XlsWriter.class.php");
$header = [
'created' => 'string',
'product_id' => 'integer',
'quantity' => '#,##0',
'amount' => 'price',
'description' => 'string',
'tax' => '[$$-1009]#,##0.00;[RED]-[$$-1009]#,##0.00',
];
$data = [
['2015-12-01'."\n".'sfdsdfasdad111111', 873, 1, '44.00', 'misc', '=D2*0.05'],
['2015-01-12', 324, 2, '88.00', 'none', '=D3*0.05'],
];
$styles1 = ['font' => 'Arial', 'font-size' => 10, 'font-style' => 'bold','wrap_text'=>true, 'fill' => '#eee', 'halign' => 'center', 'border' => 'left,right,top,bottom', 'border-style' => 'medium'];
$writer = new XLSXWriter();
$writer->writeSheetHeader('Sheet1', $header);
foreach ($data as $row)
$writer->writeSheetRow('Sheet1', $row, $styles1);
$writer->writeToFile('example2.xlsx');
'wrap_text'=>true
matters,and also you need "\n"
my sheet are all dot border ,how can I make it to your style ? I hope you could help me,thx
please show me the code
If this is still an issue, you can make a new ticket.
Hey, this framework is awesome!
How can I grow up the cell ? A2 is bigger than the cell
How can I add '%' ? ( nice to have but not important )
how can I add strings in a cell with a newliine ? ( \n doesn't work )
thank you very much!