mirror of
https://github.com/shuchkin/simplexlsxgen.git
synced 2023-08-10 21:12:59 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
ff3f016358 | |||
bcd3586731 |
@ -1,9 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
# 1.2.10 (2022-04-24)
|
||||
## 1.2.11 (2022-)
|
||||
* Row height `<style height="50">Custom row height 50</style>`
|
||||
|
||||
## 1.2.10 (2022-04-24)
|
||||
* Added colors `<style color="#FFFF00" bgcolor="#00FF00">Yellow text on blue background</style>`, thx [mrjemson](https://github.com/mrjemson)
|
||||
|
||||
# 1.1.12 (2022-03-15)
|
||||
## 1.1.12 (2022-03-15)
|
||||
* Added `$xlsx->mergeCells('A1:C1')`
|
||||
|
||||
## 1.1.11 (2022-02-05)
|
||||
|
@ -481,8 +481,9 @@ class SimpleXLSXGen {
|
||||
$COL = [];
|
||||
foreach( $this->sheets[$idx]['rows'] as $r ) {
|
||||
$CUR_ROW++;
|
||||
$row = '<row r="'.$CUR_ROW.'">';
|
||||
$row = '';
|
||||
$CUR_COL = 0;
|
||||
$RH = 0; // row height
|
||||
foreach( $r as $v ) {
|
||||
$CUR_COL++;
|
||||
if ( !isset($COL[ $CUR_COL ])) {
|
||||
@ -528,6 +529,9 @@ class SimpleXLSXGen {
|
||||
$FL += self::FL_COLOR;
|
||||
$B = strlen($m2[1]) === 8 ? $m2[1] : ('FF' . ltrim($m2[1],'#'));
|
||||
}
|
||||
if ( preg_match('/ height="([^"]+)"/', $m[1], $m2) ) {
|
||||
$RH = $m2[1];
|
||||
}
|
||||
}
|
||||
if ( strpos( $v, '<left>' ) !== false ) {
|
||||
$A += self::A_LEFT;
|
||||
@ -660,7 +664,7 @@ class SimpleXLSXGen {
|
||||
$row .= '<c r="' . $cname . '"' . ($ct ? ' t="' . $ct . '"' : '') . ($cs ? ' s="' . $cs . '"' : '') . '>'
|
||||
. ($ct === 'inlineStr' ? '<is><t>' . $cv . '</t></is>' : '<v>' . $cv . '</v>') . "</c>\r\n";
|
||||
}
|
||||
$ROWS[] = $row . "</row>\r\n";
|
||||
$ROWS[] = '<row r="'.$CUR_ROW.'"'.($RH ? ' customHeight="1" ht="'.$RH.'"' : '').'>'.$row . "</row>";
|
||||
}
|
||||
foreach ( $COL as $k => $max ) {
|
||||
$COLS[] = '<col min="'.$k.'" max="'.$k.'" width="'.min( $max+1, 60).'" />';
|
||||
|
BIN
styles.png
BIN
styles.png
Binary file not shown.
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user