How to set Excel sheet title with PHP Spout library

2.4k Views Asked by At

I am exporting Excel work book with more than 1 sheet using PHP Spout library.

How do I set the title for each sheet? By default it is giving sheet1 sheet2 etc.

And I need to provide hyperlink from sheet2 cells to sheet1 cells. How do I set hyperlinks using Spout?

1

There are 1 best solutions below

0
On BEST ANSWER

To set the title, you can do this:

$sheet = $writer->getCurrentSheet();
$sheet->setName('My custom name');

For hyperlinks, it's not possible to reference another sheet unfortunately