phpoffice / phpspreadsheet Goto Github PK
View Code? Open in Web Editor NEWA pure PHP library for reading and writing spreadsheet files
Home Page: https://phpspreadsheet.readthedocs.io
License: MIT License
A pure PHP library for reading and writing spreadsheet files
Home Page: https://phpspreadsheet.readthedocs.io
License: MIT License
Switch Date Handling Routines to use DateTime internally (to avoid use of unix Timestamp and ensure full range of Excel DateTimes on 32-bit systems), and use DateTimeInterface for typehinting so that DateTime or DateTime immutable can both be used
Formula sample: =MATCH(MAX({0,0,0,1,0,0,0,2,0,0,0,0,0,0,1,0,0}),{0,0,0,1,0,0,0,2,0,0,0,0,0,0,1,0,0})
Code sample:
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$spreadsheet->getActiveSheet()->setCellValue(
'A1',
'=MATCH(MAX({0,0,0,1,0,0,0,2,0,0,0,0,0,0,1,0,0}),{0,0,0,1,0,0,0,2,0,0,0,0,0,0,1,0,0})'
);
echo $spreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue();
This results to 4. The output i tested in excel, libreoffice calc and google sheets is 17.
in Spreadsheet class there will be a "null" as argument "$pIndex" when applying styles.
this causes a null return value when executing $this->cellXfCollection[$pIndex] on line 900;
Hi to all!
Im trying to open existing template for avoid building workbook from scratch.
It's impossible to load the template if conditional style or table was used. Source templates attached templates.zip
<?php
/*
* @file PhpSpreadsheet-master/samples/test.php
*/
require __DIR__ . '/Header.php';
// $template = __DIR__ . '/../template_no_issues.xltx';
// $template = __DIR__ . '/../template_bug_table.xltx';
$template = __DIR__ . '/../template_bug_conditional_formatting.xltx';
$output = __DIR__ . '/../workbook_' . date('d_m_Y_H_i_s') . '.xlsx';
// Create temporary file that will be read
$helper->log('Create new Spreadsheet object from ' . $template . ' template');
$callStartTime = microtime(true);
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($template);
$helper->logRead('Excel2007', $template, $callStartTime);
// Export to Excel2007 (.xlsx)
$helper->log('Write to Excel format');
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Excel2007');
$callStartTime = microtime(true);
$writer->save($output);
$helper->logWrite($writer, $output, $callStartTime);
Error log:
[04-Oct-2016 12:08:37 UTC] PHP Catchable fatal error: Argument 2 passed to PhpOffice\PhpSpreadsheet\Reader\Excel2007::readStyle() must be an instance of stdClass, instance of SimpleXMLElement given, called in /home/vagrant/vhosts/test/PhpSpreadsheet-master/src/PhpSpreadsheet/Reader/Excel2007.php on line 648 and defined in /home/vagrant/vhosts/test/PhpSpreadsheet-master/src/PhpSpreadsheet/Reader/Excel2007.php on line 1898
[04-Oct-2016 12:08:37 UTC] PHP Stack trace:
[04-Oct-2016 12:08:37 UTC] PHP 1. {main}() /home/vagrant/vhosts/test/PhpSpreadsheet-master/samples/test.php:0
[04-Oct-2016 12:08:37 UTC] PHP 2. PhpOffice\PhpSpreadsheet\IOFactory::load() /home/vagrant/vhosts/test/PhpSpreadsheet-master/samples/test.php:26
[04-Oct-2016 12:08:37 UTC] PHP 3. PhpOffice\PhpSpreadsheet\Reader\Excel2007->load() /home/vagrant/vhosts/test/PhpSpreadsheet-master/src/PhpSpreadsheet/IOFactory.php:175
[04-Oct-2016 12:08:37 UTC] PHP 4. PhpOffice\PhpSpreadsheet\Reader\Excel2007::readStyle() /home/vagrant/vhosts/test/PhpSpreadsheet-master/src/PhpSpreadsheet/Reader/Excel2007.php:648
Environment: PHP 5.6.24 on Centos
I try to generate a PDF from your samples, but get an Fatal error:
Fatal error: Uncaught TypeError: Argument 1 passed to PhpOffice\PhpSpreadsheet\Writer\PDF\MPDF::__construct() must be an instance of PhpOffice\PhpSpreadsheet\Spreadsheet, none given, called in <mypath>\vendor\PhpSpreadsheet\src\PhpSpreadsheet\Writer\PDF\MPDF.php on line 92 and defined in <mypath>\vendor\PhpSpreadsheet\src\PhpSpreadsheet\Writer\PDF\MPDF.php on line 42
When I load Mpdf separatly, and use namespaces it works.
I changed the line src\PhpSpreadsheet\Writer\PDF\MPDF.php:92 from
$pdf = new self();
to
$pdf = new \Mpdf\Mpdf();
Rename Excel2007 Reader and Writer as xlsx to reduce confusion with which Readers/Writers to use for different formats
There are currently over 440 issues and over 130 PRs which seem to be not handled due to that PHPExcel is obsolete (in favour of PHPSpreadsheet). To avoid that people keep running to the old project and report there, issues and PRs should be closed and noted that development does now happen here (PHPSpreadsheet).
I also wonder that is the latest stable branch over there? For example 1.8 has one commit more than develop which is normally not the case (as developer branches are mostly ahead of release branches).
Deprecated things should either be dropped entirely and their replacement be documented, or the @deprecated
mentions should be dropped. As noted in PHPOffice/PHPExcel#1029 it's unfortunately not always clear why it was deprecated in the first place.
Rename CachedObjectStorage as Collection/Cells and refactor to optimize
Dear,
To allow setting of border properties, I think a bug fix has to be performed:
diff --git a/src/PhpSpreadsheet/Style/Border.php b/src/PhpSpreadsheet/Style/Border.php
index dc557f7..d320de0 100644
--- a/src/PhpSpreadsheet/Style/Border.php
+++ b/src/PhpSpreadsheet/Style/Border.php
@@ -150,7 +150,7 @@ class Border extends Supervisor implements \PhpOffice\PhpSpreadsheet\IComparable
case 'right':
case 'top':
case 'vertical':
- $key = strtolower('vertical');
+ $key = strtolower($this->parentPropertyName);
break;
}
0001-MyRoFix-Border.php-getStyleArray-bug-fix-allows-a-bo.patch.zip
Hello,
how can I create a PHP Excel file that requires a Password to open the spreadsheet?
I only find functions to protect from writing.
Thanks
Image do not appear in spreadsheet after this code but in PhpExcel this works.
$signaturePath = \Yii::$app->basePath.'/storage/for_documents/sign.png';
$objDrawing = new Drawing(); //create object for Worksheet drawing
$objDrawing->setName('Sign');
$objDrawing->setDescription('Sign');
$objDrawing->setPath($signaturePath);
$objDrawing->setWidth(60);
$objDrawing->setWorksheet($this->sheet);
$objWriter = IOFactory::createWriter($saleDocumentInExcel, "Excel5");
My CSV file looks like this:
"FirstName";"FamilyName";"PhoneNumber";"Supplier";"Birthday"
"Max";"Mustermann";"+49123456789";"csv-test";03.01.1981
The shown phone number is with current code being interpreted as FORMAT_NUMERIC. But as you can see, I have wrapped it into quotes which should mean FORMAT_STRING. This causes the correctly formatted phone number being returned as 49123456789 and not +49123456789.
If my code sees 49123456789, it auto-prepends a leading zero so the numer is being "fixed". Sadly I cannot turn leading 49 into zero because there are also valid phone numbers with 49 in pre-dial code.
So is there a clean way to force PHPSpreadsheet (same with PHPExcel!) to interpret it as FORMAT_STRING (e.g. with @ symbol being set to text)?
For now PDF examples are run by phpunit, but the 3rd party libs are not installed, so the PDF code is actually never tested. We should install those lib via composer (probably as dev deps only) and properly integrate them in the test suites.
That may involve breaking the way PDF libs are configured by end-user if everything is done via composer's autoloader.
The PHP function in_array()
is slow in performance compared to isset()
. This has the fundamental reason that in_array()
loops through the whole array an compares each key. isset()
in contrast is only checking if the given key is set but it doesn't find NULL
values because it cannot do this (see documentation of each functions).
I would go and rewrite PhpSpreadsheet so it uses isset() as I see no use for checking NULL values e.g. with $filterTypes
in src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php
. Also e.g. src/PhpSpreadsheet/Writer/Xls/Worksheet.php
uses it but you can do it otherwise:
if (!isset($lockingArray[$someLock])) {
// Do some stuff
// Stuff is done
$lockingArray[$someLock] = TRUE;
}
Rename OOCalc Reader and OpenDocument Writers as ods to reduce confusion with which Readers/Writers to use for different formats
and
If the value is "#N/A" then it should not be cast to float: (float) 0 but set to NULL.
When you set the content of a cell to =HYPERLINK("#anotherspreadshet!A1","link") the class throws the next Fatal error:
Uncaught exception 'PhpOffice\PhpSpreadsheet\Calculation\Exception' with message 'anotherspreadshet!A1 -> Formula Error: An unexpected error occured' in \src\PhpSpreadsheet\Cell.php:280
Stack trace:
#0 src\PhpSpreadsheet\Writer\Xlsx\Worksheet.php(1080): PhpOffice\PhpSpreadsheet\Cell->>getCalculatedValue()
#1 src\PhpSpreadsheet\Writer\Xlsx\Worksheet.php(1027): PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet->writeCell(Object(PhpOffice\PhpSpreadsheet\Shared\XMLWriter), Object(PhpOffice\PhpSpreadsheet\Worksheet), 'A1', Array, Array)
#2 src\PhpSpreadsheet\Writer\Xlsx\Worksheet.php(80): PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet->writeSheetData(Object(PhpOffice\PhpSpreadsheet\Shared\XMLWriter), Object(PhpOffice\PhpSpreadsheet\Worksheet), Array)
#3 srcl\PhpSpreadsheet\W src\Cell.php on line 280
Sample formula:
=INDEX({"First","Second","Third","Fourth","Fifth","Sixth","Seventh"}, 4)
Errors thrown:
Undefined offset: 3 in /var/www/html/hoosh/excel_v2/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php on line 603
Undefined index: in /var/www/html/hoosh/excel_v2/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php on line 610
The scatter and radar chart examples (33create*) are passing invalid arguments to the dataseries
comment for load()
method in the IReader interface should specify @return Spreadsheet
instead of @return PhpSpreadsheet
(which doesn't exist)
Since PHP 5.2 ZipArchive is always available, and PclZip is a cause of bug. This can be seen in sample 20_Read_OOCalc_with_PCLZip.php
, which gives the following output:
$ php samples/20_Read_OOCalc_with_PCLZip.php
PHP Fatal error: Uncaught Error: Call to undefined method PhpSpreadsheet\Shared\ZipArchive::statName() in /sites/PhpSpreadsheet/src/PhpSpreadsheet/Reader/OOCalc.php:73
Stack trace:
#0 /sites/PhpSpreadsheet/src/PhpSpreadsheet/IOFactory.php(251): PhpSpreadsheet\Reader\OOCalc->canRead('/sites/PhpSprea...')
#1 /sites/PhpSpreadsheet/src/PhpSpreadsheet/IOFactory.php(173): PhpSpreadsheet\IOFactory::createReaderForFile('/sites/PhpSprea...')
#2 /sites/PhpSpreadsheet/samples/20_Read_OOCalc_with_PCLZip.php(10): PhpSpreadsheet\IOFactory::load('/sites/PhpSprea...')
#3 {main}
thrown in /sites/PhpSpreadsheet/src/PhpSpreadsheet/Reader/OOCalc.php on line 73
Fatal error: Uncaught Error: Call to undefined method PhpSpreadsheet\Shared\ZipArchive::statName() in /sites/PhpSpreadsheet/src/PhpSpreadsheet/Reader/OOCalc.php on line 73
Error: Call to undefined method PhpSpreadsheet\Shared\ZipArchive::statName() in /sites/PhpSpreadsheet/src/PhpSpreadsheet/Reader/OOCalc.php on line 73
Call Stack:
0.0001 362960 1. {main}() /sites/PhpSpreadsheet/samples/20_Read_OOCalc_with_PCLZip.php:0
0.0013 464544 2. PhpSpreadsheet\IOFactory::load() /sites/PhpSpreadsheet/samples/20_Read_OOCalc_with_PCLZip.php:10
0.0013 464544 3. PhpSpreadsheet\IOFactory::createReaderForFile() /sites/PhpSpreadsheet/src/PhpSpreadsheet/IOFactory.php:173
0.0034 603008 4. PhpSpreadsheet\Reader\OOCalc->canRead() /sites/PhpSpreadsheet/src/PhpSpreadsheet/IOFactory.php:251
So instead of debugging an obsolete, duplicated library, I suggest we drop it entirely. @MarkBaker @Progi1984 what do you think ?
$identify = IOFactory::identify($pathToFile);
$reader = IOFactory::createReader($identify);
$spreadsheet = $reader->load($pathToFile);
unset($reader, $identify);
$worksheet = $spreadsheet->getSheet(0);
$maxRowNumber = $worksheet->getHighestDataRow();
for($row = 1; $row<=$maxRowNumber; ++$row)
{
$rowToArr = array();
for($column = 0; $column <= 7; ++$column) {
$cell = $worksheet->getCellByColumnAndRow($column,$row);
if (!is_null($cell)) {
$value = $cell->getValue();
// Date/time
if($column == 7) {
if ($value >= 1) {
$value = NumberFormat::toFormattedString($cell->getCalculatedValue(), 'd:hh:mm:ss');
}
if ($value < 1) {
$value = NumberFormat::toFormattedString($cell->getCalculatedValue(), 'hh:mm:ss');
}
}
array_push($rowToArr, $value);
}
$cell = null;
$value = null;
}
}
18000 rows
8 columns
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4104 bytes) in /var/www/rgmc/administrator/components/com_muzplaylist/vendor/phpspreadsheet-dev/PhpSpreadsheet/Style/NumberFormat.php on line 477
Hi there, here is the error i got:
PHP Fatal error: Uncaught Error: Call to a member function attributes() on null in /var/www/htdocs/syncro/V3.0/autosyncro_modules/PhpSpreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php:401
This is the xl/theme/theme.xml of the file:
but xlsx.php return:
var xmlThemeName: object(SimpleXMLElement)#99 (0) {
}
var themeName : string(0) ""
I'm using phpSpreadsheet to convert hundreds of files to csv every day, it's working well except for some of them, always the same one's.
Thank you for your help
Is there a way to add a row with data like this?
$spreadsheet->setActiveSheetIndex(0)->addRow(["Hello","Welt"])
i found only the example to set cells
$spreadsheet->setActiveSheetIndex(0)
->setCellValue('A1', 'Hello')
->setCellValue('B2', 'world!')
->setCellValue('C1', 'Hello')
->setCellValue('D2', 'world!');
Fix all example code to use new bootstrap, namespacing and correct classes where changes have been made internally
I don't know how much people are using actually Numbers from Apples iWork Suite but are there any plans to support this filetype too?
I know also that the Numbers file is not documented and it would be needed to reverse engineer this format application/x-iwork-numbers-sffnumbers
Rename Excel5 Reader and Writer as xls to reduce confusion with which Readers/Writers to use for different formats
Hello,
In Excel I can define a named range for some cell and later get value by range name in formulas. Like "=CAPITAL*QUOTE".
Can we have some similar method in NamedRange class to retrieve value of the range?
Thanks!
Add a way to set data series color (and other attributes) for various chart types (at minimum bar and line).
I am willing to pay for this addition.
To reflect the new project name, the namespace should be changed to PhpSpreadsheet
I get the following exception when trying to parse a ODS file:
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1900-01-08T00:57:35.9999999999) at position 0 (1): The timezone could not be found in the database in /bla/foo/third-party/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php:533
The file contains personal data so I cannot attach it.
Hi all,
I am using your library for loading Amazon flat files. When I try to load, for example, this flat file https://s3.amazonaws.com/seller-templates/ff/eu/de/Flat.File.Jewelry.de.xls I get the exception. I think that`s the bug in the code. I get undefined offset. Maybe you can take a look at it.
Thanks!
It would be fantastic if there could be an official, lightweight (based off Alpine preferably) Docker image for PHPOffice and it's components (such as PHPSpreadsheet)
Lots of people are hesitant to install and maintain apps (Especially with PHP and I intend no offence) directly onto servers and having the ability to quickly spin up PHPOffice as a docker image on one or many servers not only greatly simplifies the install and deployment process, but can add a layer of security when coupled with SELinux and proper cgroup isolation. (Note: I am not saying that Docker itself adds security).
I found a popular PHP+FPM+Nginx base image that help you out: https://hub.docker.com/r/richarvey/nginx-php-fpm/ it should result in a nice lightweight image, ready to have the PHPOffice apps added on top which should be trivial for someone that knows the product set (not I).
It appears that when getLibXmlLoaderOptions()
is called, it globally affects external xml reading.
This is bad, because just reading excel files with this library has a global side effect, and it breaks Soap.
I created a PR with a failing test: #73
Hi there,
I want to suggest a feature for the Writers. Not easy to implement if I trust the current codebase, but pretty helpful for many integrations.
Modern PSR-7 frameworks needs to work with, well, PSR-7 Response objects. These objects use Stream objects that rely on resources to fetch data.
In the current version of PhpSpreadsheet, it's only possible to write on a file or php://output / php://stdout. It's quite tricky to get a resource this way, and writing to a temporary file could not be a viable option on many application architecture.
Adding an abstract getResource method to BaseWriters would be a great improvement for PSR-7 frameworks integration.
I know in the documentation it says that this project is Php 5.5+.
I want to include this on a system that has legacy instances and these are Php 5.3.
was it ever tested on php 5.3?
Hi,
I use several days PhpSpreadsheet for a project. It works great, I'm excited! But I have a problem now with HTML excport. I first set the default border with an array to all cells:
$this->stdStyle = [
'borders' => [
'allborders' => [
'style' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
'color' => [
'argb' => 'FFC0C0C0'
],
],
],
];
Then I use following style array for the first two rows on the right side:
$this->blackBorderStyle = [
'borders' => [
'outline' => [
'style' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUM,
'color' => [
'argb' => \PhpOffice\PhpSpreadsheet\Style\Color::COLOR_BLACK
],
],
],
];
But I see the left Border of the third row has the black border. It should be grey. And the right border disappears. This happens just in HTML export. The borders in exported Xlsx File are correct.
Can somebody correct this? Thanks in advance!
In constructor of Row
class Worksheet
is given as parameter and set in object but not exposed to outside. Currently I may need a simple getter to get the worksheet's title.
Or is there another way of getting a worksheet instance from a row instance? What I want to do is this:
// Create cache key
$cacheKey = sprintf(
'column:%s:%s:%d:%s',
pathinfo($fqfn, PATHINFO_BASENAME),
$rowInstance->getWorksheet()->getTitle(),
$rowInstance->getRowIndex(),
$value
);
Some libs have been updated and so this project should follow to always have stable and up-to-date code:
As mentioned in PR #75 it is better to use use
in header. Then you only need to change that header and not all references in many lines.
A very tiny example:
use \Vendor\Project\Type\Foo;
$fooInstance = new Foo();
[...]
$someValue = Foo::getSomeValueFromBar($bar);
Now just imagine the world without use
, you have to update many lines. With use
, you only need to touch the header of the file, nothing more.
So far we used a custom format to store data for unit tests. Mark came up with idea to get rid of it to simplify writing and parsing. Plain PHP files seems to be the best choice, allowing for potentially complex structure, exact type usage and comments.
Trying to use OLERead::read() for build a xls file validator, I found an infinite loop.
It happen in lines 152 to 159 :
while ($sbdBlock != -2) {
$pos = ($sbdBlock + 1) * self::BIG_BLOCK_SIZE;
$this->smallBlockChain .= substr($this->data, $pos, 4 * $bbs);
$pos += 4 * $bbs;
$sbdBlock = self::getInt4d($this->bigBlockChain, $sbdBlock * 4);
}
$sbdBloc takes that values : (0, 1, 2, 3, 4, 5, 6, 7, 8, 254) and reset to 0 (never become -2)
NOTE : (254 * 4) > strlen($this->bigBlockChain) causing problem in self::getInt4d()
You can try this with the attached file.
corrupted_excel_file.xls.zip
Unknown constant used as default parameter in \PhpOffice\PhpSpreadsheet\Settings::setCacheStorageMethod
public static function setCacheStorageMethod($method = CachedObjectStorageFactory::cache_in_memory, $arguments = [])
Hi there,
I found PhpExcel a great library and wanted to give a go to PhpSpreadsheet to import XLSM files into my website but I am facing an issue.
When loading an XLSM file using IOFactory::load($filename)
, the Excel2007 reader is created (as expected) but when the readStyle()
method is then called, the second argument is expected to be an stdClass but a SimpleXMLElement is given, thus throwing an exception.
As a side note, is PhpSpreadsheet ready for production yet or would you recommend I'd rather stick to PhpExcel?
Cheers.
Getting this when writing to xlsx file. I guess it is only happening when there are some charts on some other worksheets.
PHP Fatal error: Uncaught exception 'PhpOffice\PhpSpreadsheet\Exception' with message 'Cell coordinate string can not be a range of cells' in /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Cell.php:577
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php(4195): PhpOffice\PhpSpreadsheet\Cell::coordinateFromString('S147:S151')
#1 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php(502): PhpOffice\PhpSpreadsheet\Writer\Xls\Worksheet->writeCFHeader()
#2 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xls.php(173): PhpOffice\PhpSpreadsheet\Writer\Xls\Worksheet->close()
#3 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/samples/csv_to_xsl.php(139): PhpOffice\PhpSpreadsheet\Writer\Xls->save('/Applications/X...')
#4 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/samples/csv_to_xsl.php(56): writeToSpreedshe in /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Cell.php on line 577
Fatal error: Uncaught exception 'PhpOffice\PhpSpreadsheet\Exception' with message 'Cell coordinate string can not be a range of cells' in /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Cell.php:577
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php(4195): PhpOffice\PhpSpreadsheet\Cell::coordinateFromString('S147:S151')
#1 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php(502): PhpOffice\PhpSpreadsheet\Writer\Xls\Worksheet->writeCFHeader()
#2 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xls.php(173): PhpOffice\PhpSpreadsheet\Writer\Xls\Worksheet->close()
#3 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/samples/csv_to_xsl.php(139): PhpOffice\PhpSpreadsheet\Writer\Xls->save('/Applications/X...')
#4 /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/samples/csv_to_xsl.php(56): writeToSpreedshe in /Applications/XAMPP/xamppfiles/htdocs/phpspread/PhpSpreadsheet/src/PhpSpreadsheet/Cell.php on line 577
set_include_path('classes/');
spl_autoload_extensions('.php');
spl_autoload_register();
This requires the use of the letters in the file names in lowercase.
Any support to install this package with composer?
Hello guys, I'm using PhpSpreadsheet in order to generate a protected Excel file.
But after using the sample "41 - Password". Excel doesn't recognize the "secret" password used in the sample.
Any ideas?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.