Auto select Export option in File menu

Posted by: thanh.minh.le on 23 February 2023, 5:59 am EST

    • Post Options:
    • Link

    Posted 23 February 2023, 5:59 am EST - Updated 23 February 2023, 6:04 am EST

    Hi,

    We are using this code to remove the New option in File menu and it works great.

    let template = GC.Spread.Sheets.Designer.getTemplate(GC.Spread.Sheets.Designer.TemplateNames.FileMenuPanelTemplate)
        template.content[0].children[0].children[0].children[0].children[1].items.splice(0, 1)
        template.content[0].children[0].children[1].children.splice(0, 1)
        GC.Spread.Sheets.Designer.registerTemplate(GC.Spread.Sheets.Designer.TemplateNames.FileMenuPanelTemplate, template)

    Can the Export option be automatically selected when a user clicks on the File menu?



    Regards,

    Thanh

  • Posted 24 February 2023, 6:27 am EST

    Hi,

    For this, you may need to change the fileMenuSettingState. Please refer to the following code snippet and let me know if you face any issues.

    let fileMenuSetting = des.getData("fileMenuSetting") || {};
    fileMenuSetting.activeCategory_main="Export";
    des.setData("fileMenuSetting",fileMenuSetting)

    regards,

    Avinash

  • Posted 28 February 2023, 12:09 am EST - Updated 28 February 2023, 3:52 am EST

    removed

  • Posted 28 February 2023, 2:59 am EST

    HI,

    We are sorry ut on our end it is working fine. Could you please share a workig smaple that replicates the issue so that we could investigate it further nad help you accoridngly. You may also refer to the following sample that we used for testing.

    sample: https://jscodemine.grapecity.com/share/JCRKhPt2pkes7HugW1nlrw/?defaultOpen={"OpenedFileName"%3A["%2Findex.html"%2C"%2Fsrc%2Fapp.js"%2C"%2Fpackage.json"]%2C"ActiveFile"%3A"%2Fsrc%2Fapp.js"}

    Regards,

    Avinahs

  • Posted 28 February 2023, 3:34 am EST - Updated 28 February 2023, 3:52 am EST

    It’s work!

    Thank you so much!

Need extra support?

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

Learn More

Forum Channels