M
M
maksplotnikoff2017-07-11 10:33:23
PHP
maksplotnikoff, 2017-07-11 10:33:23

How to get the parent of a grouping in PHPExcel?

I am using the PHPExcel library.
The .xlsx structure is shown in the photo
916d2b879ac647d488449c84dfb2c9c7.PNG
. I use the following code:

// Подключаю библиотеку
require_once ($_SERVER['DOCUMENT_ROOT'].'Classes/PHPExcel.php');
$pExcel = PHPExcel_IOFactory::load($_SERVER['DOCUMENT_ROOT'].'/out.xlsm');
foreach ($pExcel->getWorksheetIterator() as $worksheet) {
    foreach ($worksheet->getRowDimensions() as $rowDimension) {
        $level = $rowDimension->getOutlineLevel();
        echo  '<pre>';
        print_r($level);
        echo  '</pre>';
}
}

The $level variable stores the nesting level of the grouping. And how to get the name of the group's parent?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question