iliaal / php_excel

PHP Extension interface to the Excel writing/reading library
http://ilia.ws
534 stars 131 forks source link

Getting started doesn't work? #233

Closed t2-yoshida closed 3 years ago

t2-yoshida commented 6 years ago

I use Windows 10/64bit, PHP 7.2.5 on Apache 2.4 build VC15. An error occurred in Getting started.

Warning: ExcelSheet::write(): Failed to write cell in row 1, column 1 with error 'ok' in path/to/php

following code.

$xlSheet2->write($row, $col, $date->getTimestamp(), $dateFormat, \ExcelFormat::AS_DATE);

Excel file is outputed, but nothing is outputed on sheet2. Is there any solution?

youngvan commented 6 years ago

got the same error after upgrading to php 7.2

running linux with license

belgattitude commented 6 years ago

@youngvan did you upgrade from PHP7+ or PHP5.+ ?

I didn't check for multiple sheets like @t2-yoshida seems to have problem with.

But for my usage it's working great with PHP7.2, libxl-3.8.2 under Ubuntu 16.04.

My install script is here (It uses ondrej/ppa and a regular pecl install) :

https://gist.github.com/belgattitude/69d3245227d4cc284996e3f0a1bc0033

Hope it helps.

Update: Linking to https://github.com/iliaal/php_excel/issues/212

youngvan commented 6 years ago

I have it even for single-page document

it happen after upgrading 7.0 to 7.2

i will try your script and will post update

youngvan commented 6 years ago

moved here https://github.com/iliaal/php_excel/issues/234