2

I use PhpSpreadsheet for read xlsx file. How to open xlsx passowrd protected file?

$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load('file.xlsx');  
$spreadsheet->getSecurity()->setWorkbookPassword('111111');
$worksheet = $spreadsheet->getActiveSheet();
Mikhail Zhuikov
  • 1,213
  • 2
  • 9
  • 19
Andryshok
  • 21
  • 1
  • Possible duplicate of https://stackoverflow.com/questions/49941725/ – Jay Dadhania Jan 24 '21 at 16:27
  • Does this answer your question? [Open XLSX file that protected by a password with PHPSpreadsheet](https://stackoverflow.com/questions/49941725/open-xlsx-file-that-protected-by-a-password-with-phpspreadsheet) – Alfabravo Sep 30 '22 at 15:22

0 Answers0