diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..985e7f6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,81 @@ +# Changelog + +## 1.0.12 (2021-05-19) + +* Fixed hyperlink regex + +## 1.0.11 (2021-05-14) + +* Fixed 0.00% format, thx [marcrobledo](https://github.com/shuchkin/simplexlsxgen/pull/34), more examples in README.md + +## 1.0.10 (2021-05-03) + +Stable release + +* Added hyperlinks and minimal formatting + +## 0.9.25 (2021-02-26) + +* Added PHP Datetime object values in a cells + +## 0.9.24 (2021-02-26) + +* Percent support + + +## 0.9.23 (2021-01-25) + +* Fix local floats in XML + + +## 0.9.22 (2020-11-04) + +* Added multiple sheets support, thx [Savino59](https://github.com/Savino59), class ready for extend now + +## 0.9.21 (2020-10-17) + +* Updated images + +## 0.9.20 (2020-10-04) + +* Disable type detection if string started with chr(0) + +## 0.9.19 (2020-08-23) + +* Numbers like SKU right aligned now + +## 0.9.18 (2020-08-22) + +* Fixed fast shared strings index + +## 0.9.17 (2020-08-21) + +* Fixed real numbers in 123.45 format detection, fast shared strings index (thx fredriksundin) + +## 0.9.16 (2020-07-29) + +* Fixed time detection in HH:MM:SS format + +## 0.9.15 (2020-07-14) + +* Escape of shared strings for special chars in cells [#1](https://github.com/shuchkin/simplexlsxgen/issues/1) + +## 0.9.14 (2020-05-31) + +* Fixed num2name A-Z,AA-AZ column names, thx Ertan Yusufoglu + +## 0.9.13 (2020-05-21) + +* If string more 160 chars, save as inlineStr + +## 0.9.12 (2020-05-21) + +* Readme fixed + +## 0.9.11 (2020-05-21) + +* Removed XML unimportant attributes + +## 0.9.10 (2020-05-20) + +* Initial release \ No newline at end of file diff --git a/README.md b/README.md index 2c7ed93..4e107ce 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ SimpleXLSXGen::fromArray( $books )->addSheet( $books2 )->download(); // Alternative interface, sheet name, get xlsx content $xlsx_cache = (string) (new SimpleXLSXGen)->addSheet( $books, 'Modern style'); -// Classice interface +// Classic interface $xlsx = new SimpleXLSXGen(); $xlsx->addSheet( $books, 'Catalog 2021' ); $xlsx->addSheet( $books2, 'Stephen King catalog'); @@ -92,7 +92,7 @@ $xlsx->downloadAs('books_2021.xlsx'); exit(); ``` -### Debug +## Debug ```php ini_set('error_reporting', E_ALL ); ini_set('display_errors', 1 ); @@ -101,25 +101,4 @@ $data = [ ['Debug', 123] ] SimpleXLSXGen::fromArray( $data )->saveAs('debug.xlsx'); -``` - - -## History -v1.0.11 (2021-05-14) Fixed 0.00% format, thx [marcrobledo](https://github.com/shuchkin/simplexlsxgen/pull/34), more examples in README.md
-v1.0.10 (2021-05-03) + Hyperlinks, + Minimal formatting
-v0.9.25 (2021-02-26) Added PHP Datetime object values in a cells
-v0.9.24 (2021-02-26) * Percent
-v0.9.23 (2021-01-25) Fix local floats in XML
-v0.9.22 (2020-11-04) Added multiple sheets support, thx [Savino59](https://github.com/Savino59), class ready for extend now
-v0.9.21 (2020-10-17) Updated images
-v0.9.20 (2020-10-04) Disable type detection if string started with chr(0)
-v0.9.19 (2020-08-23) Numbers like SKU right aligned now
-v0.9.18 (2020-08-22) Fixed fast shared strings index
-v0.9.17 (2020-08-21) Fixed real numbers in 123.45 format detection, fast shared strings index (thx fredriksundin)
-v0.9.16 (2020-07-29) Fixed time detection in HH:MM:SS format
-v0.9.15 (2020-07-14) escape of shared strings for special chars in cells [#1](https://github.com/shuchkin/simplexlsxgen/issues/1)
-v0.9.14 (2020-05-31) fixed num2name A-Z,AA-AZ column names, thx Ertan Yusufoglu
-v0.9.13 (2020-05-21) if string more 160 chars, save as inlineStr
-v0.9.12 (2020-05-21) readme fixed
-v0.9.11 (2020-05-21) removed XML unimportant attributes
-v0.9.10 (2020-05-20) initial release \ No newline at end of file +``` \ No newline at end of file diff --git a/src/SimpleXLSXGen.php b/src/SimpleXLSXGen.php index 2569959..638ecbb 100644 --- a/src/SimpleXLSXGen.php +++ b/src/SimpleXLSXGen.php @@ -496,7 +496,7 @@ class SimpleXLSXGen { $N = self::N_DATETIME; // [22] m/d/yy h:mm } elseif ( preg_match( '/^[0-9+-.]+$/', $v ) ) { // Long ? $A = self::A_RIGHT; - } elseif ( preg_match( '/https?:\/\/\S+/i', $v ) ) { + } elseif ( preg_match( '/^https?:\/\/\S+$/i', $v ) ) { $h = explode( '#', $v ); $this->sheets[ $idx ]['hyperlinks'][] = ['ID' => 'rId' . ( count( $this->sheets[ $idx ]['hyperlinks'] ) + 1 ), 'R' => $cname, 'H' => $h[0], 'L' => isset( $h[1] ) ? $h[1] : '']; $F = self::F_HYPERLINK; // Hyperlink