Chandra Sekar
Chandra Sekar

Reputation: 312

How to set Excel sheet title with PHP Spout library

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?

Upvotes: 4

Views: 2578

Answers (1)

Adrien
Adrien

Reputation: 1947

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

Upvotes: 6

Related Questions