What file type to pass to spread.open() when opening new file of type .sjs?

Posted by: tyler.franklin on 5 January 2023, 3:40 pm EST

    • Post Options:
    • Link

    Posted 5 January 2023, 3:40 pm EST - Updated 5 January 2023, 3:45 pm EST

    What type should the object be when trying to use spread.open() to open a file of type .sjs? I receive the below error message when I try to pass a blob to spread.open().

    This is how I create the blob I am passing to spread.open().

  • Posted 6 January 2023, 6:33 am EST

    HI,

    You need to make sure that the blob have type of “application/zip”. Further if you still face any issues. Please share a working sample that replicates the issue so that we could investigate it further and help you accordingly.

    regards,

    Avinash

  • Posted 6 January 2023, 10:17 am EST

    Awesome. That worked. I wasn’t including the type when creating the blob.

     const blob = new Blob([arrayBuffer], { type: "application/zip" });

    Thank you.

  • Posted 12 January 2023, 12:25 pm EST - Updated 12 January 2023, 12:30 pm EST

    Good morning,

    Now I am trying to open a file of type .xlsm by using the spread.import() function as referenced here: https://www.grapecity.com/spreadjs/docs/features/spreadjs-file-format

    I receive the attached error when I try the following code. Do you have any guidance?

    
     var blob = new Blob([xlsmFile]);
                var spread = GC.Spread.Sheets.findControl(host);
                spread.import(blob, () => {
                }, (e) => {
                    console.log(e.errorMessage);
                }, {
                    fileType: GC.Spread.Sheets.FileType.excel
                });
                return "Bidder successfully opened."
            }
            catch (e) {
                console.log(e);
                return "Error opening .xlsm file. Error message: " + e;
            }
    

  • Posted 13 January 2023, 3:13 am EST

    Hi,

    The .xlsm is not supported with SpreadJS that is it could not be loaded. We are sorry for the inconvenience.

    Regards,

    Avinash

Need extra support?

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

Learn More

Forum Channels