Suggest approriate type for the spread object for the using typescript in react

Posted by: rehman.khaleelur on 21 April 2021, 3:55 pm EST

  • Posted 21 April 2021, 3:55 pm EST

    For using SpreadJS in react application using the typescript in react code, can you please suggest and appropriate type for the spread object that can be used in the initSpread() method.
    Looking forward for the reply.

  • Replied 22 April 2021, 9:52 pm EST


    SpreadJS provide the Workbook instance inside the workbookInitialized event so the type should GC.Spread.Sheets.Workbook. Please refer to the follwoing code snippet and and let su know if you face any issues.

    workbookInitialized(spread: GC.Spread.Sheets.Workbook) {
    // save spread instance for future references

    // init spread
    var sheet = spread.getActiveSheet();
    sheet.setColumnWidth(3, 120);
    public render() {
    return (
    <Worksheet />

  • Marked as Answer

    Replied 25 April 2021, 10:48 am EST

    Thanks for the help. No issues faced.

Need extra support?

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

Learn More

Forum Channels