Google Apps Script that exports a protected Google Sheets spreadsheet to XLSX, preserving formulas, formatting, etc. This bypasses View Only restrictions that disable you from copying and exporting and such. Console logs the download URL of XLSX file.

Replace ssID with Sheets spreadsheet ID.