Change default font in spreadjs

Posted by: canoe.company-0a on 18 October 2022, 3:18 am EST

  • Posted 18 October 2022, 3:18 am EST

    How to change the default font in the toolbar of spreadjs? I tried it with the below code. But it didn’t working.

        var active = spread.getActiveSheet();
        sheetstyle.font = "8pt Arial";
    
        active.setDefaultStyle(sheetstyle, GC.Spread.Sheets.SheetArea.viewport);
    
  • Posted 19 October 2022, 12:42 am EST

    Hi,

    SpreadJS V15.2.3, the most recent version I tested with, appears to be functioning well on my end. After establishing the default style, have you tried calling the designer’s refresh method?

    Please refer to the test sample below, which we have used. If the problem still exists for you, would you kindly give a minimal working sample that replicates the problem so that we can look into it and offer you the necessary help?

    Sample: https://jscodemine.grapecity.com/share/cIkgaGcUwk6vNDOQCTTnwA/

    API References:

    refresh method: https://www.grapecity.com/spreadjs/api/designer/classes/GC.Spread.Sheets.Designer.Designer#refresh

    Regards,

    Ankit

Need extra support?

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

Learn More

Forum Channels