Clean up very obsolete links

This commit is contained in:
Adrien Crivelli 2017-12-30 19:07:22 +09:00
parent ca6114639a
commit 4dd486fb94
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
12 changed files with 54 additions and 114 deletions

View File

@ -11,21 +11,11 @@ with PHP's `iconv()` or `mb_convert_encoding()` functions.
PhpSpreadsheet holds an "in memory" representation of a spreadsheet, so
it is susceptible to PHP's memory limitations. The memory made available
to PHP can be increased by editing the value of the `memory_limit`
directive in your php.ini file, or by using
directive in your `php.ini` file, or by using
`ini_set('memory_limit', '128M')` within your code.
Some Readers and Writers are faster than others, and they also use
differing amounts of memory. You can find some indication of the
relative performance and memory usage for the different Readers and
Writers, over the different versions of PhpSpreadsheet, on the
[discussion
board](http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=234150).
If you've already increased memory to a maximum, or can't change your
memory limit, then [this
discussion](http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=242712)
on the board describes some of the methods that can be applied to reduce
the memory usage of your scripts using PhpSpreadsheet.
differing amounts of memory.
## Protection on my worksheet is not working?
@ -65,32 +55,3 @@ file in Excel, the actual width is 0.71 less than it should be.
The short answer is that PhpSpreadsheet uses a measure where padding is
included. See [how to set a column's width](./topics/recipes.md#setting-a-columns-width)
for more details.
## How do I use PhpSpreadsheet with my framework
- There are some instructions for using PhpSpreadsheet with Joomla on
the [Joomla message
board](http://http:/forum.joomla.org/viewtopic.php?f=304&t=433060)
- A page of advice on using [PhpSpreadsheet in the Yii
framework](http://www.yiiframework.com/wiki/101/how-to-use-phpexcel-external-library-with-yii/)
- [The
Bakery](http://bakery.cakephp.org/articles/melgior/2010/01/26/simple-excel-spreadsheet-helper)
has some helper classes for reading and writing with PhpSpreadsheet
within CakePHP
- Integrating [PhpSpreadsheet into Kohana
3](http://www.flynsarmy.com/2010/07/phpexcel-module-for-kohana-3/)
and [Интеграция PHPExcel и Kohana
Framework](http://szpargalki.blogspot.com/2011/02/phpexcel-kohana-framework.html)
- Using [PhpSpreadsheet with
TYPO3](http://typo3.org/documentation/document-library/extension-manuals/phpexcel_library/1.1.1/view/toc/0/)
### Tutorials
- [English PHPExcel tutorial](http://openxmldeveloper.org)
- [French PHPExcel
tutorial](http://g-ernaelsten.developpez.com/tutoriels/excel2007/)
- [Russian PHPExcel Blog
Postings](http://www.web-junior.net/sozdanie-excel-fajjlov-s-pomoshhyu-phpexcel/)
- [A Japanese-language introduction to
PHPExcel](http://journal.mycom.co.jp/articles/2009/03/06/phpexcel/index.html)

View File

@ -61,10 +61,8 @@ In Excel `+` wins over `&`, just like `*` wins over `+` in ordinary
algebra. The former rule is not what one finds using the calculation
engine shipped with PhpSpreadsheet.
Reference for operator precedence in Excel:
<http://support.microsoft.com/kb/25189>
Reference for operator precedence in PHP: <http://www.php.net/operators>
- [Reference for Excel](https://support.office.com/en-us/article/Calculation-operators-and-precedence-in-Excel-48be406d-4975-4d31-b2b8-7af9e0e2878a)
- [Reference for PHP](http://php.net/manual/en/language.operators.php)
#### Formulas involving numbers and text
@ -76,8 +74,7 @@ formula is evaluated as 3 instead of evaluating as an error. This also
causes the Excel document being generated as containing unreadable
content.
Reference for this behaviour in PHP:
<http://php.net/manual/en/language.types.string.php#language.types.string.conversion>
- [Reference for this behaviour in PHP](http://php.net/manual/en/language.types.string.php#language.types.string.conversion)
#### Formulas dont seem to be calculated in Excel2003 using compatibility pack?

View File

@ -11,21 +11,18 @@ Currently, PhpSpreadsheet supports the following File Types for Reading:
### Xls
The Microsoft Excel™ Binary file format (BIFF5 and BIFF8) is a binary
file format that was used by Microsoft Excel™ between versions 95 and
2003. The format is supported (to various extents) by most spreadsheet
file format that was used by Microsoft Excel™ between versions 95 and 2003.
The format is supported (to various extents) by most spreadsheet
programs. BIFF files normally have an extension of .xls. Documentation
describing the format can be found online at
<http://msdn.microsoft.com/en-us/library/cc313154(v=office.12).aspx> or
from [as a downloadable
PDF](http://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/%5BMS-XLS%5D.pdf).
describing the format can be [read online](https://msdn.microsoft.com/en-us/library/cc313154(v=office.12).aspx)
or [downloaded as PDF](http://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/%5BMS-XLS%5D.pdf).
### Xml
Microsoft Excel™ 2003 included options for a file format called
SpreadsheetML. This file is a zipped XML document. It is not very
common, but its core features are supported. Documentation for the
format can be found at
<http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx>
format can be [read online](https://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx)
though its sadly rather sparse in its detail.
### Xlsx
@ -35,23 +32,21 @@ Office Open XML SpreadsheetML, and Excel 2010 extended this still
further with its new features such as sparklines. These files typically
have an extension of .xlsx. This format is based around a zipped
collection of eXtensible Markup Language (XML) files. Microsoft Office
Open XML SpreadsheetML is mostly standardized in ECMA 376
(<http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm>)
Open XML SpreadsheetML is mostly standardized in [ECMA 376](http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm)
and ISO 29500.
### Ods
aka Open Document Format (ODF) or OASIS, this is the OpenOffice.org XML
File Format for spreadsheets. It comprises a zip archive including
file format for spreadsheets. It comprises a zip archive including
several components all of which are text files, most of these with
markup in the eXtensible Markup Language (XML). It is the standard file
format for OpenOffice.org Calc and StarCalc, and files typically have an
extension of .ods. The published specification for the file format is
available from the OASIS Open Office XML Format Technical Committee web
page
(<http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office#technical>).
Other information is available from the OpenOffice.org XML File Format
web page (<http://xml.openoffice.org/general.html>), part of the
available from [the OASIS Open Office XML Format Technical Committee web
page](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office).
Other information is available from [the OpenOffice.org XML File Format
web page](http://www.openoffice.org/xml/), part of the
OpenOffice.org project.
### Slk
@ -66,12 +61,12 @@ options (unlike CSV files).
### Gnumeric
The Gnumeric file format is used by the Gnome Gnumeric spreadsheet
application, and typically files have an extension of .gnumeric. The
The [Gnumeric file format](https://help.gnome.org/users/gnumeric/stable/sect-file-formats.html.en#file-format-gnumeric)
is used by the Gnome Gnumeric spreadsheet
application, and typically files have an extension of `.gnumeric`. The
file contents are stored using eXtensible Markup Language (XML) markup,
and the file is then compressed using the GNU project's gzip compression
library.
<http://projects.gnome.org/gnumeric/doc/file-format-gnumeric.shtml>
### Csv

View File

@ -1,15 +0,0 @@
# Useful links and tools
There are some links and tools which are very useful when developing
using PhpSpreadsheet.
## OpenXML / SpreadsheetML
- [File format
documentation](http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm)
- [OpenXML Explained
e-book](http://openxmldeveloper.org/articles/1970.aspx)
- [Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint
2007 File
Formats](http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en)
- [OpenXML Package Explorer](http://www.codeplex.com/PackageExplorer/)

View File

@ -47,7 +47,7 @@ you to select the most appropriate implementation for your environnement. You
can either implement [PSR-16](http://www.php-fig.org/psr/psr-16/) from scratch,
or use [pre-existing libraries](https://packagist.org/search/?q=psr-16).
One such library is [PHP Cache](http://www.php-cache.com/) which
One such library is [PHP Cache](https://www.php-cache.com/) which
provides a wide range of alternatives. Refers to their documentation for
details, but here are a few suggestions that should get you started.

View File

@ -4,15 +4,17 @@
XML-based formats such as OfficeOpen XML, Excel2003 XML, OASIS and
Gnumeric are susceptible to XML External Entity Processing (XXE)
injection attacks (for an explanation of XXE injection see
http://websec.io/2012/08/27/Preventing-XEE-in-PHP.html) when reading
spreadsheet files. This can lead to:
injection attacks when reading spreadsheet files. This can lead to:
- Disclosure whether a file is existent
- Server Side Request Forgery
- Command Execution (depending on the installed PHP wrappers)
To prevent this, by default every XML-based Reader looks for XML entities declared inside the DOCTYPE and if any is found an exception is raised.
To prevent this, by default every XML-based Reader looks for XML
entities declared inside the DOCTYPE and if any is found an exception
is raised.
Read more [about of XXE injection](https://websec.io/2012/08/27/Preventing-XXE-in-PHP.html).
## Loading a Spreadsheet File
@ -566,16 +568,16 @@ CSV | YES | HTML | NO
When loading data from a file that contains no formatting information,
such as a CSV file, then data is read either as strings or numbers
(float or integer). This means that PhpSpreadsheet does not
automatically recognise dates/times (such as "16-Apr-2009" or "13:30"),
booleans ("TRUE" or "FALSE"), percentages ("75%"), hyperlinks
("http://www.phpexcel.net"), etc as anything other than simple strings.
automatically recognise dates/times (such as `16-Apr-2009` or `13:30`),
booleans (`true` or `false`), percentages (`75%`), hyperlinks
(`https://www.example.com`), etc as anything other than simple strings.
However, you can apply additional processing that is executed against
these values during the load process within a Value Binder.
A Value Binder is a class that implement the
\PhpOffice\PhpSpreadsheet\Cell\IValueBinder interface. It must contain a
bindValue() method that accepts a `\PhpOffice\PhpSpreadsheet\Cell\Cell` and a
value as arguments, and return a boolean true or false that indicates
`\PhpOffice\PhpSpreadsheet\Cell\IValueBinder` interface. It must contain a
`bindValue()` method that accepts a `\PhpOffice\PhpSpreadsheet\Cell\Cell` and a
value as arguments, and return a boolean `true` or `false` that indicates
whether the workbook cell has been populated with the value or not. The
Advanced Value Binder implements such a class: amongst other tests, it
identifies a string comprising "TRUE" or "FALSE" (based on locale

View File

@ -275,7 +275,7 @@ You can make a cell a clickable URL by setting its hyperlink property:
``` php
$spreadsheet->getActiveSheet()->setCellValue('E26', 'www.phpexcel.net');
$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('http://www.phpexcel.net');
$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('https://www.example.com');
```
If you want to make a hyperlink to another worksheet/cell, use the

View File

@ -22310,7 +22310,7 @@
<Cell ss:StyleID="ce16"/>
</Row>
<Row ss:Height="13.4079">
<Cell ss:MergeAcross="2" ss:HRef="http://www.phpexcel.net/" ss:StyleID="ce17">
<Cell ss:MergeAcross="2" ss:HRef="https://www.example.com/" ss:StyleID="ce17">
<Data ss:Type="String">PhpSpreadsheet</Data>
</Cell>
<Cell ss:Index="1024" ss:StyleID="ce13"/>

Binary file not shown.

View File

@ -246,7 +246,7 @@ $spreadsheet->getActiveSheet()->getStyle('B1')->getProtection()->setLocked(Prote
// Add a hyperlink to the sheet
$helper->log('Add a hyperlink to an external website');
$spreadsheet->getActiveSheet()->setCellValue('E26', 'www.phpexcel.net');
$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('http://www.phpexcel.net');
$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('https://www.example.com');
$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setTooltip('Navigate to website');
$spreadsheet->getActiveSheet()->getStyle('E26')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT);

View File

@ -9,7 +9,7 @@ class HyperlinkTest extends TestCase
{
public function testGetUrl()
{
$urlValue = 'http://www.phpexcel.net';
$urlValue = 'https://www.example.com';
$testInstance = new Hyperlink($urlValue);
@ -19,7 +19,7 @@ class HyperlinkTest extends TestCase
public function testSetUrl()
{
$initialUrlValue = 'http://www.phpexcel.net';
$initialUrlValue = 'https://www.example.com';
$newUrlValue = 'http://github.com/PHPOffice/PhpSpreadsheet';
$testInstance = new Hyperlink($initialUrlValue);
@ -55,7 +55,7 @@ class HyperlinkTest extends TestCase
public function testIsInternal()
{
$initialUrlValue = 'http://www.phpexcel.net';
$initialUrlValue = 'https://www.example.com';
$newUrlValue = 'sheet://Worksheet1!A1';
$testInstance = new Hyperlink($initialUrlValue);
@ -69,9 +69,9 @@ class HyperlinkTest extends TestCase
public function testGetHashCode()
{
$urlValue = 'http://www.phpexcel.net';
$urlValue = 'https://www.example.com';
$tooltipValue = 'PhpSpreadsheet Web Site';
$initialExpectedHash = '6f1d4cbf40034b9ddc3fbf6019506e91';
$initialExpectedHash = '3a8d5a682dba27276dce538c39402437';
$testInstance = new Hyperlink($urlValue, $tooltipValue);

View File

@ -16,7 +16,7 @@ class OdsTest extends TestCase
/**
* @var Spreadsheet
*/
private $spreadsheetOOCalcTest;
private $spreadsheetOdsTest;
/**
* @var Spreadsheet
@ -26,17 +26,17 @@ class OdsTest extends TestCase
/**
* @return Spreadsheet
*/
protected function loadOOCalcTestFile()
private function loadOdsTestFile()
{
if (!$this->spreadsheetOOCalcTest) {
if (!$this->spreadsheetOdsTest) {
$filename = __DIR__ . '/../../../samples/templates/OOCalcTest.ods';
// Load into this instance
$reader = new Ods();
$this->spreadsheetOOCalcTest = $reader->loadIntoExisting($filename, new Spreadsheet());
$this->spreadsheetOdsTest = $reader->loadIntoExisting($filename, new Spreadsheet());
}
return $this->spreadsheetOOCalcTest;
return $this->spreadsheetOdsTest;
}
/**
@ -87,7 +87,7 @@ class OdsTest extends TestCase
public function testReadValueAndComments()
{
$spreadsheet = $this->loadOOCalcTestFile();
$spreadsheet = $this->loadOdsTestFile();
$firstSheet = $spreadsheet->getSheet(0);
@ -152,7 +152,7 @@ class OdsTest extends TestCase
public function testReadColors()
{
$spreadsheet = $this->loadOOCalcTestFile();
$spreadsheet = $this->loadOdsTestFile();
$firstSheet = $spreadsheet->getSheet(0);
// Background color
@ -166,7 +166,7 @@ class OdsTest extends TestCase
public function testReadRichText()
{
$spreadsheet = $this->loadOOCalcTestFile();
$spreadsheet = $this->loadOdsTestFile();
$firstSheet = $spreadsheet->getSheet(0);
self::assertEquals(
@ -189,14 +189,14 @@ class OdsTest extends TestCase
public function testReadHyperlinks()
{
$spreadsheet = $this->loadOOCalcTestFile();
$spreadsheet = $this->loadOdsTestFile();
$firstSheet = $spreadsheet->getSheet(0);
$hyperlink = $firstSheet->getCell('A29');
self::assertEquals(DataType::TYPE_STRING, $hyperlink->getDataType());
self::assertEquals('PHPExcel', $hyperlink->getValue());
self::assertEquals('http://www.phpexcel.net/', $hyperlink->getHyperlink()->getUrl());
self::assertEquals('PhpSpreadsheet', $hyperlink->getValue());
self::assertEquals('https://github.com/PHPOffice/phpspreadsheet', $hyperlink->getHyperlink()->getUrl());
}
// Below some test for features not implemented yet
@ -205,7 +205,7 @@ class OdsTest extends TestCase
{
$this->markTestIncomplete('Features not implemented yet');
$spreadsheet = $this->loadOOCalcTestFile();
$spreadsheet = $this->loadOdsTestFile();
$firstSheet = $spreadsheet->getSheet(0);
// Font styles