mirror of
https://github.com/shuchkin/simplexlsxgen.git
synced 2023-08-10 21:12:59 +03:00
disable type detection
This commit is contained in:
parent
a551f6485b
commit
a9219575df
@ -1,4 +1,4 @@
|
|||||||
# SimpleXLSXGen class 0.9.19 (Official)
|
# SimpleXLSXGen class 0.9.20 (Official)
|
||||||
[<img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.herokuapp.com%2Fshuchkin" />](https://www.patreon.com/shuchkin) [<img src="https://img.shields.io/github/license/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/blob/master/license.md) [<img src="https://img.shields.io/github/stars/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/stargazers) [<img src="https://img.shields.io/github/forks/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/network) [<img src="https://img.shields.io/github/issues/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/issues)
|
[<img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.herokuapp.com%2Fshuchkin" />](https://www.patreon.com/shuchkin) [<img src="https://img.shields.io/github/license/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/blob/master/license.md) [<img src="https://img.shields.io/github/stars/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/stargazers) [<img src="https://img.shields.io/github/forks/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/network) [<img src="https://img.shields.io/github/issues/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/issues)
|
||||||
|
|
||||||
Export data to Excel XLSX file. PHP XLSX generator. No external tools and libraries.<br/>
|
Export data to Excel XLSX file. PHP XLSX generator. No external tools and libraries.<br/>
|
||||||
@ -42,8 +42,9 @@ $data = [
|
|||||||
['Procent', '12%'],
|
['Procent', '12%'],
|
||||||
['Datetime', '2020-05-20 02:38:00'],
|
['Datetime', '2020-05-20 02:38:00'],
|
||||||
['Date','2020-05-20'],
|
['Date','2020-05-20'],
|
||||||
['Time','02:38:00'],
|
['Time','02:38:00'],
|
||||||
['String', 'See SimpleXLSXGen column autosize feature']
|
['String', 'See SimpleXLSXGen column autosize feature'],
|
||||||
|
['Disable Type Detection', "\0".'2020-10-04 16:02:00']
|
||||||
];
|
];
|
||||||
SimpleXLSXGen::fromArray( $data )->saveAs('datatypes.xlsx');
|
SimpleXLSXGen::fromArray( $data )->saveAs('datatypes.xlsx');
|
||||||
```
|
```
|
||||||
@ -62,6 +63,7 @@ SimpleXLSXGen::fromArray( $data )->saveAs('debug.xlsx');
|
|||||||
|
|
||||||
|
|
||||||
## History
|
## History
|
||||||
|
V0.9.20 (2020-10-04) Disable type detection if string started \0
|
||||||
v0.9.19 (2020-08-23) Numbers like SKU right aligned now<br/>
|
v0.9.19 (2020-08-23) Numbers like SKU right aligned now<br/>
|
||||||
v0.9.18 (2020-08-22) Fixed fast shared strings index<br/>
|
v0.9.18 (2020-08-22) Fixed fast shared strings index<br/>
|
||||||
v0.9.17 (2020-08-21) Fixed real numbers in 123.45 format detection, fast shared strings index (thx fredriksundin)<br/>
|
v0.9.17 (2020-08-21) Fixed real numbers in 123.45 format detection, fast shared strings index (thx fredriksundin)<br/>
|
||||||
|
@ -221,6 +221,7 @@ class SimpleXLSXGen {
|
|||||||
if ( preg_match('/^[0-9+-.]+$/', $v ) ) { // Long ?
|
if ( preg_match('/^[0-9+-.]+$/', $v ) ) { // Long ?
|
||||||
$cs = 7; // Align Right
|
$cs = 7; // Align Right
|
||||||
}
|
}
|
||||||
|
$v = ltrim($v,"\0"); // disabled type detection
|
||||||
$ct = 's'; // shared string
|
$ct = 's'; // shared string
|
||||||
$v = str_replace(['&','<','>'],['&','<','>'], $v);
|
$v = str_replace(['&','<','>'],['&','<','>'], $v);
|
||||||
$cv = false;
|
$cv = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user