Skip to content

Commit 68673fd

Browse files
author
unknown
committed
++
1 parent 052ef3b commit 68673fd

File tree

1 file changed

+0
-70
lines changed

1 file changed

+0
-70
lines changed

src/Maatwebsite/Excel/Excel.php

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -935,76 +935,6 @@ public function setFreeze($pane = 'A2')
935935
return $this;
936936
}
937937

938-
/**
939-
*
940-
* Set a range of cell borders
941-
*
942-
* @param string $pane Start and end of the cell (A1:F10)
943-
* @param string $weight Border style (Reference setBorder style list)
944-
* @return $this
945-
*
946-
* @author xiehai
947-
* @example ->setBorder('A1:F10','thick')
948-
*
949-
*/
950-
951-
public function setBorder($pane = '', $weight = 'thin')
952-
{
953-
/*
954-
@ ~ Border styles list ~ @
955-
956-
PHPExcel_Style_Border::BORDER_NONE = 'none'
957-
PHPExcel_Style_Border::BORDER_DASHDOT = 'dashDot'
958-
PHPExcel_Style_Border::BORDER_DASHDOTDOT = 'dashDotDot'
959-
PHPExcel_Style_Border::BORDER_DASHED = 'dashed'
960-
PHPExcel_Style_Border::BORDER_DOTTED = 'dotted'
961-
PHPExcel_Style_Border::BORDER_DOUBLE = 'double'
962-
PHPExcel_Style_Border::BORDER_HAIR = 'hair'
963-
PHPExcel_Style_Border::BORDER_MEDIUM = 'medium'
964-
PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT = 'mediumDashDot'
965-
PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT = 'mediumDashDotDot'
966-
PHPExcel_Style_Border::BORDER_MEDIUMDASHED = 'mediumDashed'
967-
PHPExcel_Style_Border::BORDER_SLANTDASHDOT = 'slantDashDot'
968-
PHPExcel_Style_Border::BORDER_THICK = 'thick'
969-
PHPExcel_Style_Border::BORDER_THIN = 'thin'
970-
*/
971-
972-
$weight = $pane == 'A1' ? 'none' : $weight;
973-
974-
$this->excel->getActiveSheet()
975-
->getStyle($pane)
976-
->getBorders()
977-
->getAllBorders()
978-
->setBorderStyle($weight);
979-
980-
return $this;
981-
}
982-
983-
/**
984-
*
985-
* Set all cell borders
986-
*
987-
* @param string $weight Border style (Reference setBorder style list)
988-
* @return $this
989-
*
990-
* @author xiehai
991-
* @example Excel::create()->setAllBorder() Must follow the function of create()
992-
*
993-
*/
994-
995-
public function setAllBorder($weight = 'thin')
996-
{
997-
$styleArray = array(
998-
'borders' => array(
999-
'allborders' => array(
1000-
'style' => $weight
1001-
)
1002-
)
1003-
);
1004-
1005-
$this->excel->getDefaultStyle()->applyFromArray($styleArray);
1006-
return $this;
1007-
}
1008938

1009939

1010940

0 commit comments

Comments
 (0)