How to get a style from a worksheet and set as shared in some cells of another worksheet

Topics: Developer Forum, User Forum
Feb 11, 2011 at 5:02 PM


first of all congratulations for the hard work. This library is really brilliant!

I have a question:

can i "copy" a style from a cell of worksheet 1 and then set as shared in cells of worksheet 2?


I tried something so but it didn't work.

$sheet = $phpexcel->getSheetByName('styles'); $styles = array(); $styles['category'] = $sheet->getStyle("B10"); $styles['url']['expected'] = $sheet->getStyle("B11"); $styles['url']['real'] = $sheet->getStyle("B13"); $sheet = $phpexcel->getSheetByName('output'); $sheet->setSharedStyle($styles['category'], "B2:L2");

Where is the problem?




Feb 14, 2011 at 8:31 AM

nobody has an answer about this? or just an hint