3

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?

Chandra Sekar
  • 302
  • 1
  • 13

1 Answers1

6

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

Adrien
  • 1,929
  • 1
  • 13
  • 23