Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aVadim483 committed Nov 4, 2023
1 parent 5711389 commit a1c6f10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/FastExcelTemplator/Excel.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ protected function _importSheets()
{
foreach ($this->sheets as $sheetId => $sheet) {
$sheet->sheetWriter = $this->excelWriter->makeSheet($sheet->name());
$innerFile = 'xl/worksheets/sheet' . $sheetId . '.xml';
$this->xmlReader->openZip($innerFile);
$this->xmlReader->openZip($sheet->path());
while ($this->xmlReader->read()) {
if ($this->xmlReader->nodeType === \XMLReader::ELEMENT && $this->xmlReader->name === 'col') {
// <col min="1" max="1" width="20.83203125" customWidth="1"/>
Expand Down
8 changes: 8 additions & 0 deletions src/FastExcelTemplator/Sheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ public function __construct($sheetName, $sheetId, $file, $path, $excel)
$this->postReadFunc = [$this, 'postRead'];
}

/**
* @return string
*/
public function path(): string
{
return $this->path;
}

/**
* @param string|null $file
*
Expand Down

0 comments on commit a1c6f10

Please sign in to comment.