I am using the Perl module Excel::Writer::XLSX to write an Excel workbook in Linux. I am writing to three separate worksheets and am trying to hide the first two so that only the third worksheet is visible.
Perl Code:
JavaScript
x
$worksheet3->activate();
$worksheet1->hide();
$worksheet2->hide();
Instead, using the code below, only the first worksheet tab is being hidden.
What am I doing wrong?
Advertisement
Answer
JavaScript
# Sheet2 won't be visible until it is unhidden in Excel.
$worksheet1->hide();
$worksheet2->hide();
Please activate the excel after the hidden sheets.
JavaScript
$worksheet3->activate();
I have tested this.