mirror of
https://github.com/shuchkin/simplexlsxgen.git
synced 2023-08-10 21:12:59 +03:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
0fc338d802 | |||
a8093b9d8e | |||
a9219575df | |||
476e083f29 | |||
db598d4ee4 |
@ -1,4 +1,4 @@
|
||||
# SimpleXLSXGen class 0.9.19 (Official)
|
||||
# SimpleXLSXGen class 0.9.21 (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)
|
||||
|
||||
Export data to Excel XLSX file. PHP XLSX generator. No external tools and libraries.<br/>
|
||||
@ -42,8 +42,9 @@ $data = [
|
||||
['Procent', '12%'],
|
||||
['Datetime', '2020-05-20 02:38:00'],
|
||||
['Date','2020-05-20'],
|
||||
['Time','02:38:00'],
|
||||
['String', 'See SimpleXLSXGen column autosize feature']
|
||||
['Time','02:38:00'],
|
||||
['String', 'Long UTF-8 String in autoresized column'],
|
||||
['Disable Type Detection', "\0".'2020-10-04 16:02:00']
|
||||
];
|
||||
SimpleXLSXGen::fromArray( $data )->saveAs('datatypes.xlsx');
|
||||
```
|
||||
@ -62,6 +63,8 @@ SimpleXLSXGen::fromArray( $data )->saveAs('debug.xlsx');
|
||||
|
||||
|
||||
## History
|
||||
v0.9.21 (2020-10-17) Updated images<br/>
|
||||
v0.9.20 (2020-10-04) Disable type detection if string started with chr(0)<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.17 (2020-08-21) Fixed real numbers in 123.45 format detection, fast shared strings index (thx fredriksundin)<br/>
|
||||
|
BIN
books.png
BIN
books.png
Binary file not shown.
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 22 KiB |
BIN
datatypes.png
BIN
datatypes.png
Binary file not shown.
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 31 KiB |
@ -216,13 +216,14 @@ class SimpleXLSXGen {
|
||||
$cs = 6; // [22] m/d/yy h:mm
|
||||
} elseif ( mb_strlen( $v ) > 160 ) {
|
||||
$ct = 'inlineStr';
|
||||
$cv = str_replace(['&','<','>'],['&','<','>'], $v);
|
||||
$cv = str_replace(['&','<','>',"\x03"],['&','<','>',''], $v);
|
||||
} else {
|
||||
if ( preg_match('/^[0-9+-.]+$/', $v ) ) { // Long ?
|
||||
$cs = 7; // Align Right
|
||||
}
|
||||
$v = ltrim($v,"\0"); // disabled type detection
|
||||
$ct = 's'; // shared string
|
||||
$v = str_replace(['&','<','>'],['&','<','>'], $v);
|
||||
$v = str_replace(['&','<','>',"\x03"],['&','<','>',''], $v);
|
||||
$cv = false;
|
||||
$skey = '~'.$v;
|
||||
if ( isset($SI_KEYS[ $skey ]) ) {
|
||||
|
Reference in New Issue
Block a user