Posted 28 February 2022, 9:45 am EST
Hi,
I am using the SpreadJS Designer component v14.1
When I am working with SpreadJS, I create a new workbook using it’s constructor and retain the pointer to the workbook in a variable: “spread”
spread = new GC.Spread.Sheets.Workbook( $( '#' + spreadsheetid ).get( 0 ), newBookOptions );
If the user uses the SpreadJS Designer Component to create a new workbook off the File menu, I find that my “spread” variable does not point to the new workbook. For example, any initialization I performed on the original workbook (such as registering keyboard commands) are lost when the new workbook is created.
So my question is: Is this behavior expected? And if so, a) how can I get my spread variable to point to the new workbook. And b) is there an event I can use to re-initialize the new workbook.
Thanks.
