php - PHPExcel. Get border style of a cell -


i'm converting xls/xlsx file html table , i'm trying keep embedded excel styles saved in xls file. managed detect if cell has styles:

$objphpexcel = new phpexcel(); $objphpexcel = phpexcel_iofactory::load("excelfile.xls"); $objworksheet = $objphpexcel->getactivesheet();  foreach ($objworksheet->getrowiterator() $row) {     foreach ($celliterator $cell) {         $background_color = $cell->getstyle()->getfill()->getstartcolor()->getrgb();         $fore_color = $cell->getstyle()->getfont()->getcolor()->getrgb();         $font_bold = $cell->getstyle()->getfont()->getbold();         $font_italic = $cell->getstyle()->getfont()->getitalic();     } } 

but can't find how detect if cell has border , style border is (there's documentation setting border not retreiving borders).

you can use

->getstyle('a1')->getborders()->gettop()->getcolor()->getrgb(); ->getstyle('a1')->getborders()->gettop()->getborderstyle(); 

and on...

:)


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -