Skip to content

Commit

Permalink
Rename Excel5 into Xls
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi authored and Mirocow committed Jan 16, 2017
1 parent 3ba7a86 commit ad6cec3
Show file tree
Hide file tree
Showing 54 changed files with 199 additions and 197 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|---------------------------------|-------------------------------------------|
| `PHPExcel` | `PhpOffice\PhpSpreadsheet\Spreadsheet` |
| `PHPExcel_Reader_Excel2007` | `PhpOffice\PhpSpreadsheet\Reader\Xlsx` |
| `PHPExcel_Reader_Excel5` | `PhpOffice\PhpSpreadsheet\Reader\Xls` |
| `PHPExcel_Writer_Excel2007` | `PhpOffice\PhpSpreadsheet\Writer\Xlsx` |
| `PHPExcel_Writer_Excel5` | `PhpOffice\PhpSpreadsheet\Writer\Xls` |

- Some methods were renamed for clarity and/or consistency:

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader03.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader05.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader06.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader07.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader08.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader09.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader10.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader11.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader12.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader17.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader18.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader19.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
$inputFileName = './sampleData/example1.xls';

/** Create a new Reader of the type defined in $inputFileType **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
include 'PHPExcel/IOFactory.php';


$inputFileType = 'Excel5';
$inputFileType = 'Xls';
$inputFileName = './sampleData/example2.xls';

/** Create a new Reader of the type defined in $inputFileType **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## General Introduction

### Function that are not Supported in Excel5
### Function that are not Supported in Xls

Not all functions are supported by the Excel 5 Writer. Use of these functions within your workbooks will result in an error when trying to write to Excel5.
Not all functions are supported by the Excel 5 Writer. Use of these functions within your workbooks will result in an error when trying to write to Xls.

The following is the list of those functions that are implemented within PHPExcel, but that cannot currently be written to Excel 5.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ DATEVALUE uses the php date/time object implementation of strtotime() (which can

__WARNING:-__ PHPExcel accepts a wider range of date formats than MS Excel, so it is entirely possible that Excel will return a #VALUE! error when passed a date string that it can’t interpret, while PHPExcel is able to translate that same string into a correct date value.

Care should be taken in workbooks that use string formatted dates in calculations when writing to Excel5 or Xlsx.
Care should be taken in workbooks that use string formatted dates in calculations when writing to Xls or Xlsx.

#### DAY

Expand Down Expand Up @@ -435,7 +435,7 @@ $retVal = call_user_func_array(

##### Notes

__WARNING:-__ This function does not currently work with the Excel5 Writer when a PHP Boolean is used for the third (optional) parameter (as shown in the example above), and the writer will generate and error. It will work if a numeric 0 or 1 is used for the method parameter; or if the Excel TRUE() and FALSE() functions are used instead.
__WARNING:-__ This function does not currently work with the Xls Writer when a PHP Boolean is used for the third (optional) parameter (as shown in the example above), and the writer will generate and error. It will work if a numeric 0 or 1 is used for the method parameter; or if the Excel TRUE() and FALSE() functions are used instead.

#### EDATE

Expand Down Expand Up @@ -498,7 +498,7 @@ $retVal = call_user_func_array(

###### Notes

__WARNING:-__ This function is currently not supported by the Excel5 Writer because it is not a standard function within Excel 5, but an add-in from the Analysis ToolPak.
__WARNING:-__ This function is currently not supported by the Xls Writer because it is not a standard function within Excel 5, but an add-in from the Analysis ToolPak.

#### EOMONTH

Expand Down Expand Up @@ -559,7 +559,7 @@ $retVal = call_user_func_array(

##### Notes

__WARNING:-__ This function is currently not supported by the Excel5 Writer because it is not a standard function within Excel 5, but an add-in from the Analysis ToolPak.
__WARNING:-__ This function is currently not supported by the Xls Writer because it is not a standard function within Excel 5, but an add-in from the Analysis ToolPak.

#### HOUR

Expand Down
2 changes: 1 addition & 1 deletion Documentation/markdown/Overview/01-Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ $objPHPExcel->getActiveSheet()->getProtection()->setSheet(true);

Not all features of PHPExcel are implemented in all of the Reader / Writer classes. This is mostly due to underlying libraries not supporting a specific feature or not having implemented a specific feature.

For example autofilter is not implemented in PEAR Spreadsheet_Excel_writer, which is the base of our Excel5 writer.
For example autofilter is not implemented in PEAR Spreadsheet_Excel_writer, which is the base of our Xls writer.

We are slowly building up a list of features, together with the different readers and writers that support them, in the "Functionality Cross-Reference.xls" file in the /Documentation folder.

Expand Down
2 changes: 1 addition & 1 deletion Documentation/markdown/Overview/07-Accessing-Cells.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ $objPHPExcel->getActiveSheet()->getStyle('A10')
![07-simple-example-1.png](./images/07-simple-example-1.png "")


**Note** that not all complex format masks such as this one will work when retrieving a formatted value to display "on screen", or for certain writers such as HTML or PDF, but it will work with the true spreadsheet writers (Xlsx and Excel5).
**Note** that not all complex format masks such as this one will work when retrieving a formatted value to display "on screen", or for certain writers such as HTML or PDF, but it will work with the true spreadsheet writers (Xlsx and Xls).

### Setting a range of cells from an array

Expand Down
4 changes: 2 additions & 2 deletions Documentation/markdown/Overview/08-Recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Xlsx');
$objWriter->save('php://output');
```

Example of a script redirecting an Excel5 file to the client's browser:
Example of a script redirecting an Xls file to the client's browser:

```php
/* Here there will be some code where you create $objPHPExcel */
Expand All @@ -1092,7 +1092,7 @@ header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="myfile.xls"');
header('Cache-Control: max-age=0');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Xls');
$objWriter->save('php://output');
```

Expand Down
6 changes: 3 additions & 3 deletions Documentation/markdown/Overview/10-Reading-and-Writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ Office2003 compatibility option should only be used when needed. This option dis

### Excel 5 (BIFF) file format

Excel5 file format is the old Excel file format, implemented in PHPExcel to provide a uniform manner to create both .xlsx and .xls files. It is basically a modified version of [PEAR Spreadsheet_Excel_Writer][21], although it has been extended and has fewer limitations and more features than the old PEAR library. This can read all BIFF versions that use OLE2: BIFF5 (introduced with office 95) through BIFF8, but cannot read earlier versions.
Xls file format is the old Excel file format, implemented in PHPExcel to provide a uniform manner to create both .xlsx and .xls files. It is basically a modified version of [PEAR Spreadsheet_Excel_Writer][21], although it has been extended and has fewer limitations and more features than the old PEAR library. This can read all BIFF versions that use OLE2: BIFF5 (introduced with office 95) through BIFF8, but cannot read earlier versions.

Excel5 file format will not be developed any further, it just provides an additional file format for PHPExcel.
Xls file format will not be developed any further, it just provides an additional file format for PHPExcel.

__Excel5 (BIFF) limitations__
Please note that BIFF file format has some limits regarding to styling cells and handling large spreadsheets via PHP.
Expand Down Expand Up @@ -704,7 +704,7 @@ $objWorksheet = $objPHPexcel->getActiveSheet();
$objWorksheet->getCell('A1')->setValue('John');
$objWorksheet->getCell('A2')->setValue('Smith');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, 'Excel5');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, 'Xls');
$objWriter->save('write.xls');
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PHPExcel can read a number of different spreadsheet and file formats, although n

Currently, PHPExcel supports the following File Types for Reading:

### Excel5
### 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 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][1] or from [http://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/[MS-XLS].pdf][2] (as a downloadable PDF).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $objPHPExcel = PHPExcel_IOFactory::load($inputFileName);
The load() method will attempt to identify the file type, and instantiate a loader for that file type; using it to load the file and store the data and any formatting in a PHPExcel object.

The method makes an initial guess at the loader to instantiate based on the file extension; but will test the file before actually executing the load: so if (for example) the file is actually a CSV file or contains HTML markup, but that has been given a .xls extension (quite a common practise), it will reject the Excel5 loader that it would normally use for a .xls file; and test the file using the other loaders until it finds the appropriate loader, and then use that to read the file.
The method makes an initial guess at the loader to instantiate based on the file extension; but will test the file before actually executing the load: so if (for example) the file is actually a CSV file or contains HTML markup, but that has been given a .xls extension (quite a common practise), it will reject the Xls loader that it would normally use for a .xls file; and test the file using the other loaders until it finds the appropriate loader, and then use that to read the file.

While easy to implement in your code, and you don't need to worry about the file type; this isn't the most efficient method to load a file; and it lacks the flexibility to configure the loader in any way before actually reading the file into a PHPExcel object.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you know the file type of the spreadsheet file that you need to load, you can
```php
$inputFileName = './sampleData/example1.xls';

/** Create a new Excel5 Reader **/
/** Create a new Xls Reader **/
$objReader = new PHPExcel_Reader_Excel5();
// $objReader = new PHPExcel_Reader_Excel2007();
// $objReader = new PHPExcel_Reader_Excel2003XML();
Expand All @@ -24,7 +24,7 @@ $objPHPExcel = $objReader->load($inputFileName);
Alternatively, you can use the IO Factory's createReader() method to instantiate the reader object for you, simply telling it the file type of the reader that you want instantiating.

```php
$inputFileType = 'Excel5';
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
Expand Down
Loading

0 comments on commit ad6cec3

Please sign in to comment.