Insert New Row FlexSheet

Posted by: oskarputraa on 28 October 2019, 5:36 am EST

  • Posted 28 October 2019, 5:36 am EST

    Hi,

    I’m trying to insert 1000 new rows, when I use this code, it work properly

    insertRows(totalRow: number) {
    		this.formatSheet.insertRows(this.formatSheet.rows.length - 1,1000);
    	}
    

    but when I use my parameter value ‘totalRow’ , it only added 1 row.

    insertRows(totalRow: number) {
    		this.formatSheet.insertRows(this.formatSheet.rows.length - 1,totalRow);
    	}
    

    Could you help me with that ? Thanks.

    Best Regards,

    Oskar Putra

  • Posted 30 October 2019, 12:42 am EST

    Hi Oskar,

    Please make sure that the totalRow variable is assigned to a number. The FlexSheet is inserting only a single row because the 2nd parameter of the insertRows function is undefined.

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels