Fixing style errors.
This commit is contained in:
parent
fe8d7f7f1b
commit
f5b34370b6
@ -448,7 +448,8 @@ class ExportExcel2007new extends ModeleExports
|
|||||||
* @param string $endCell
|
* @param string $endCell
|
||||||
* @return int 1 if success -1 if failed
|
* @return int 1 if success -1 if failed
|
||||||
*/
|
*/
|
||||||
public function setCellValue($val, $startCell, $endCell = '') {
|
public function setCellValue($val, $startCell, $endCell = '')
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
$this->workbook->getActiveSheet()->setCellValue($startCell, $val);
|
$this->workbook->getActiveSheet()->setCellValue($startCell, $val);
|
||||||
|
|
||||||
@ -472,7 +473,8 @@ class ExportExcel2007new extends ModeleExports
|
|||||||
* @param string $thickness style \PhpOffice\PhpSpreadsheet\Style\Border
|
* @param string $thickness style \PhpOffice\PhpSpreadsheet\Style\Border
|
||||||
* @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color
|
* @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color
|
||||||
*/
|
*/
|
||||||
public function setBorderStyle($thickness, $color) {
|
public function setBorderStyle($thickness, $color)
|
||||||
|
{
|
||||||
$this->styleArray['borders'] = array(
|
$this->styleArray['borders'] = array(
|
||||||
'outline' => array(
|
'outline' => array(
|
||||||
'borderStyle' => $thickness,
|
'borderStyle' => $thickness,
|
||||||
@ -487,7 +489,8 @@ class ExportExcel2007new extends ModeleExports
|
|||||||
* @param bool $bold
|
* @param bool $bold
|
||||||
* @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color
|
* @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color
|
||||||
*/
|
*/
|
||||||
public function setFontStyle($bold, $color) {
|
public function setFontStyle($bold, $color)
|
||||||
|
{
|
||||||
$this->styleArray['font'] = array(
|
$this->styleArray['font'] = array(
|
||||||
'color' => array('argb' => $color),
|
'color' => array('argb' => $color),
|
||||||
'bold' => $bold
|
'bold' => $bold
|
||||||
@ -499,14 +502,16 @@ class ExportExcel2007new extends ModeleExports
|
|||||||
*
|
*
|
||||||
* @param string $horizontal PhpOffice\PhpSpreadsheet\Style\Alignment
|
* @param string $horizontal PhpOffice\PhpSpreadsheet\Style\Alignment
|
||||||
*/
|
*/
|
||||||
public function setAlignmentStyle($horizontal) {
|
public function setAlignmentStyle($horizontal)
|
||||||
|
{
|
||||||
$this->styleArray['alignment'] = array('horizontal' => $horizontal);
|
$this->styleArray['alignment'] = array('horizontal' => $horizontal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset Style
|
* Reset Style
|
||||||
*/
|
*/
|
||||||
public function resetStyle() {
|
public function resetStyle()
|
||||||
|
{
|
||||||
$this->styleArray = array();
|
$this->styleArray = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,7 +523,8 @@ class ExportExcel2007new extends ModeleExports
|
|||||||
* @param bool $boldTitle
|
* @param bool $boldTitle
|
||||||
* @return int 1 if OK, -1 if KO
|
* @return int 1 if OK, -1 if KO
|
||||||
*/
|
*/
|
||||||
public function setBlock($startCell, $TDatas = array(), $boldTitle = false) {
|
public function setBlock($startCell, $TDatas = array(), $boldTitle = false)
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
if (! empty($TDatas)) {
|
if (! empty($TDatas)) {
|
||||||
$startCell = $this->workbook->getActiveSheet()->getCell($startCell);
|
$startCell = $this->workbook->getActiveSheet()->getCell($startCell);
|
||||||
@ -554,7 +560,8 @@ class ExportExcel2007new extends ModeleExports
|
|||||||
* @param bool $boldTitle
|
* @param bool $boldTitle
|
||||||
* @return int 1 if OK, -1 if KO
|
* @return int 1 if OK, -1 if KO
|
||||||
*/
|
*/
|
||||||
public function setBlock2Columns($startCell, $TDatas = array(), $boldTitle = false) {
|
public function setBlock2Columns($startCell, $TDatas = array(), $boldTitle = false)
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
if (! empty($TDatas)) {
|
if (! empty($TDatas)) {
|
||||||
$startCell = $this->workbook->getActiveSheet()->getCell($startCell);
|
$startCell = $this->workbook->getActiveSheet()->getCell($startCell);
|
||||||
@ -584,7 +591,8 @@ class ExportExcel2007new extends ModeleExports
|
|||||||
* @param string $firstColumn
|
* @param string $firstColumn
|
||||||
* @param string $lastColumn
|
* @param string $lastColumn
|
||||||
*/
|
*/
|
||||||
public function enableAutosize($firstColumn, $lastColumn) {
|
public function enableAutosize($firstColumn, $lastColumn)
|
||||||
|
{
|
||||||
foreach (range($firstColumn, $lastColumn) as $columnID) {
|
foreach (range($firstColumn, $lastColumn) as $columnID) {
|
||||||
$this->workbook->getActiveSheet()->getColumnDimension($columnID)->setAutoSize(true);
|
$this->workbook->getActiveSheet()->getColumnDimension($columnID)->setAutoSize(true);
|
||||||
}
|
}
|
||||||
@ -599,7 +607,8 @@ class ExportExcel2007new extends ModeleExports
|
|||||||
* @param int $offset Starting offset
|
* @param int $offset Starting offset
|
||||||
* @return string Coordinate or -1 if KO
|
* @return string Coordinate or -1 if KO
|
||||||
*/
|
*/
|
||||||
public function setMergeCellValueByLength($val, $startCell, $length, $offset = 0) {
|
public function setMergeCellValueByLength($val, $startCell, $length, $offset = 0)
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
$startCell = $this->workbook->getActiveSheet()->getCell($startCell);
|
$startCell = $this->workbook->getActiveSheet()->getCell($startCell);
|
||||||
$startColumn = Coordinate::columnIndexFromString($startCell->getColumn());
|
$startColumn = Coordinate::columnIndexFromString($startCell->getColumn());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user