Commit Graph

1930 Commits

Author SHA1 Message Date
Enyby 30a5e4b893
Fixed bug on load XML with column filter
`continue;` break columnID increment. Another problem can be on Merged cells.
2016-12-14 22:03:21 +09:00
DCoderLT 2484a03f19
Fix fatal error when `RichText` extract container cell's font
`RichText` tries to extract container cell's font via
`Cell->getParent()->getStyle(...)`, which crashes because
`getParent()` does not return a worksheet. Changing it to
`getWorksheet()` fixes the problem.
2016-12-14 21:56:57 +09:00
jacobsreynolds 720fb3eff5
Read background color of cells from HTML file
If a <td> in HTML has a bgcolor attribute, it is then applied to the spreadsheet file
2016-12-14 21:40:59 +09:00
Arthur Miniconi ab7aa68300
Excel2003 XML parse Interior Pattern property 2016-12-14 21:29:36 +09:00
Adrien Crivelli 4b011b427f
Forgot to commit the migration tool command line 2016-12-13 23:48:24 +09:00
golodnyi a6a709a4ba Not relevant parameters when calling functions 2016-12-09 12:33:41 +09:00
Adrien Crivelli c8a8fd2610
Stricter check whether file exists before reading
This should avoid issues when user submit a non-existing filename
that is wrongly identified as CSV.

Typically https://github.com/PHPOffice/PHPExcel/issues/1076 and
https://github.com/PHPOffice/PHPExcel/issues/1078 could have been
avoided.
2016-12-09 00:15:22 +09:00
golodnyi 5e03e282e5
Duplicate case in switch 2016-12-08 19:22:58 +09:00
mattkibbler 62345ef4da
Allow start and end date of DATEDIF function to be the same 2016-12-04 19:04:10 +09:00
Nikolay Ninkov a7155d8890
Partial localization of functions in Bulgarian 2016-12-04 18:48:21 +09:00
Adrien Crivelli 3bd0f6f985
Fix autofilter cloning across PHP versions
Avoid indirect access variable ambiguity across PHP 5.6 and PHP 7.0
2016-12-04 16:44:40 +09:00
Matthias Van Woensel 39b8dbd0a1
Adding float cast to MOD function
If $a or $b are not strings, you can get an error that fmod needs param 1 ($a) to be of type double.
MS Excel does not fall over when you insert an empty string in MOD, so I'm guessing PHPExcel should do the same?
2016-12-04 16:12:51 +09:00
Gemorroj 48a6e86adc
Added missing variables 2016-12-04 15:58:21 +09:00
Herman M. Hofman b964788d5c
FIX PHP Fatal Error on an invalid Blip Field.
For (still) unknown reasons, PHPExcel detects a wrong field type.
If there is no BSE Index, we will fail here and other fields are not read.
So if the BSE Index < 1, continue with the next field.
TODO: Why is there no BSE Index?
      Is this a new Office Version?
      Password protected field?
      More likely : a uncompatible picture

PHP Notice:  Undefined offset: -1 in Classes/PHPExcel/Reader/Excel5.php on line 1063
PHP Fatal error:  Call to a member function getBlipType() on a non-object in Classes/PHPExcel/Reader/Excel5.php on line 1064
2016-12-04 15:47:20 +09:00
josch1710 c1f5bdba5d
removeColumn doesn't remove all cells
removeColumn doesn't remove all cells, because CacheBase::deleteCacheData only unsets cell data if they are objects.
But cached cell data could be arrays.
I moved the unset from inside the if block (line 150 ff) to after the if block.
2016-12-04 15:33:47 +09:00
appelflap 3b4f54722f
Also check Library Path
LibraryName was being checked twice.
2016-12-04 15:28:50 +09:00
Adrien Crivelli 6d44884e19
Drop deprecated methods #22 2016-12-04 15:06:31 +09:00
Adrien Crivelli a06731fcc6
Wrap lines to 80
We wrapped lines to make easier the source easier to read, and to have more manageable diffs.

This was done with something like:

```sh
pandoc --wrap=auto --atx-headers -f markdown -t markdown-fenced_code_attributes+pipe_tables+raw_html+intraword_underscores`
```
2016-12-04 00:00:54 +09:00
Adrien Crivelli 17d1976526
Remove obsolete `$obj` prefix in cod sample 2016-12-03 22:32:54 +09:00
Adrien Crivelli 90da50f3c7
Reorganise documentation
We aim for long pages instead of several small one, to make
`CTRL+F`ing easier and URL less prone to changes in the future.
There is still way to improve it though...
2016-12-03 22:16:45 +09:00
Adrien Crivelli e6d8362fb2
Some functions were not callable because of wrong declaration 2016-12-03 14:51:04 +09:00
Adrien Crivelli 22b9a3f66f
Drop PHP version checked according to our new requirement of PHP 5.5 2016-12-03 11:35:04 +09:00
Adrien Crivelli 5b7d6cc524
Remove obsolete `##VERSION##` and `##DATE##` that are not managed by svn anymore 2016-12-03 11:31:35 +09:00
Adrien Crivelli 4b0d3c8c1c
Drop the old `\PHPExcel_Calculation_Functions::VERSION()`
This fucntion does not exist in Excel and it is non trivial to implement
without svn. Thus it was incorrect for many releases.
2016-12-03 11:19:22 +09:00
Adrien Crivelli 854f7e838d
Support `#N/A` values in charts
FIX #50
2016-12-03 10:49:03 +09:00
Adrien Crivelli 268fc1a4c4
Fix unit tests for PHP < 7.0 2016-11-28 01:58:10 +09:00
Adrien Crivelli f754c830dc
Use real tables for function lists 2016-11-28 01:12:03 +09:00
Adrien Crivelli 435d6807c8
Add missing sample image 2016-11-28 00:53:19 +09:00
Adrien Crivelli 144848f9dd
Convert docs with our migrator 2016-11-28 00:51:44 +09:00
Adrien Crivelli 5ad6ced95c
Introduce a tool to migrate from PHPExcel to PhpSpreadsheet 2016-11-28 00:13:57 +09:00
Adrien Crivelli 166f21c07a
Update PHP required version in doc 2016-11-27 22:23:09 +09:00
Adrien Crivelli 21f08146b0
Add documentation welcome page 2016-11-27 19:34:17 +09:00
Adrien Crivelli 3851aa5d6f
Migrate docs to Markdown and Read the Docs
FIX #8
2016-11-27 18:54:51 +09:00
Adrien Crivelli e6bbc4bd25
Convert all line ending to unix style 2016-11-27 15:45:15 +09:00
Adrien Crivelli f74fde155f
Remove non-obvious BaseReader's dependency
BaseReader called `isValidFormat` despite it doesn't require it to be
implemented. Instead we replaced `isValidFormat` by a proper implementation
of `canRead` in each classes. This also remove the semantic amibguity between
those two methods.

FIX #32
2016-11-27 14:29:25 +09:00
Green Wang 8c58385d6c
Fix cant get right format chinese date format error
modify preg expression in NumberFormat.php

[DBNum1][$-804]yyyy"年"m"月"d"日";@
[DBNum1][$-804]yyyy"年"m"月";@
[DBNum1][$-804]m"月"d"日";@

FIX #44
2016-11-27 13:39:45 +09:00
tomaszsita 939f24ecb4
Calculate column auto width for merged cells (if horizontal, 1-column wide merge only)
This is to fix the situation when cells merged vertically are ignored in columns auto size calculations.

I also removed $calculateMergeCells param as it wasn't used and I believe the only situation when you
want to calculate the width of merged columns has been covered here (and there's no reason to not calculate it).

FIX #46
2016-11-25 17:54:56 +09:00
Adrien Crivelli 6d8ba6f7f0
Revert references to classes in global namespace
Some references to classes were incorrectly assumed to be a reference
to self, whereas they were references to classes in global namespace
outside of this project.

FIX #37
2016-11-16 22:43:44 +09:00
Alexander Kurilo 1df5f97a5b Require GD for saving images in xls
GD is implicitly required for saving images anyway, this exception when
it's not loaded simply gives more information on what to do if the
execution flow reaches a places that depends on a function from GD.
2016-11-16 22:23:09 +09:00
Alexander Kurilo 408da0c17a Make HTML checks more strict 2016-11-16 22:21:30 +09:00
Alexander Kurilo 928b592c14 Add readable labels for data provider samples 2016-11-16 22:21:30 +09:00
Alexander Kurilo 2809cce298 Remove unused data from test provider data set 2016-11-16 22:21:30 +09:00
Alexander Kurilo edb3974a0d Move XEEE test data to add data for other readers 2016-11-16 22:21:30 +09:00
Roland Haeder 4b4831be07 Catch some invalid parameter (may come from damaged file) and throw exception. (#39)
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-11-16 22:17:43 +09:00
Adrien Crivelli 3cc80bd874 Update README.md 2016-10-27 13:17:55 +09:00
Adrien Crivelli 699d11f3a4 Mentions that PhpSpreadsheet is not released yet 2016-10-27 13:16:14 +09:00
Roland Haeder 296cc69f0a Avoid array_key_exists(), unless we need to check NULL values (#35)
```php
<?php
$array = array(
	'str'  => 'foo',
	'num'  => 12345,
	'null' => NULL,
);

print intval(isset($array['null'])) . PHP_EOL;
print intval(array_key_exists($array['null'])) . PHP_EOL;
print intval(isset($array['num'])) . PHP_EOL;
print intval(array_key_exists($array['num'])) . PHP_EOL;
print intval(isset($array['str'])) . PHP_EOL;
print intval(array_key_exists($array['str'])) . PHP_EOL;
```

Only for this special case, you need array_key_exists(), else avoid it as it is
painfully slow and hurts your performance.

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-10-26 20:01:11 +09:00
Adrien Crivelli fb1d280e82
Remove all references to "hack" from the source code
Remove the term "hack" from the source code to prevent it
from being flagged by malware scanners and audit tools (such as
the very popular myJoomla.com for Joomla sites)
2016-10-24 20:24:56 +09:00
Elan Ruusamäe 9ceedaf528 Update composer.json
fill description for recommend tags. the value is not dependency, but informational text:
https://getcomposer.org/doc/04-schema.md#suggest
2016-10-24 19:58:00 +09:00
Phil Taylor ec9e548153
Remove the term "hacked by" from the source code
Remove the term "hacked by" from the source code to prevent it
from being flagged by malware scanners and audit tools (such as
the very popular myJoomla.com for Joomla sites)
2016-10-24 19:50:13 +09:00