x
ActiveReportsJS v5.2 is Here! Check out our newest update. ActiveReportsJS v5.2 is Here! ARJS 5.2 is Here!

Issue with Importing Sheet and Cell Protection Settings in SpreadJS

Posted by: npathak on 20 February 2025, 12:42 pm EST

    • Post Options:
    • Link

    Posted 20 February 2025, 12:42 pm EST

    Hello SpreadJS Community,

    I’m encountering an issue with importing sheet and cell protection settings after exporting a Google Sheet into SpreadJS. When I check the import options, I see that the sheet protection settings do not come through correctly.

    Here’s what I’ve observed:

    • When the sheet is protected in Google Sheets,
      sheet.options.isProtected
      returns
      false
      after the import.
    • Additionally,
      sheet.options.protectionOptions
      is an empty object, even though the sheet and cell protections are set in Google Sheets.

    I’ve reviewed the documentation and tried the import process in the SpreadJS Designer, but I’m seeing the same behavior.

    Can anyone shed light on whether there have been any changes to the handling of sheet and cell protection with the new import system in SpreadJS?

    Thank you in advance for your help!

  • Posted 21 February 2025, 4:43 am EST

    Hi,

    We can replicate the behaviour you mentioned on our end. However, this behavior is not specific to SpreadJS but it is because Google Sheets does not export the sheet protection options to the XLSX files. Therefore, the protection options are missing from the XLSX file you are importing in SpreadJS due to which the workbook is editable. The same behaviour can be observed in Microsoft Excel too.

    You can further refer to this Google Community Thread (https://support.google.com/docs/thread/4687051/is-it-possible-to-keep-the-cell-protection-when-a-sheet-is-downloaded-as-an-excel-file?hl=en) to learn more about this Google Sheets limitation.

    To replicate the behavior in Microsoft Excel similar to SpreadJS, open the file downloaded from Google Sheets into Microsoft Excel and try to edit the values protected in Google Sheets. You can observe that the sheets are editable even if they are protected in Google Sheets.

    Please feel free to reach out if you encounter any further issues or require additional guidance.

    Best Regards,

    Ankit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels