Finding a way arround OutOfMemoryException

Posted by: adrien.corbin on 21 September 2018, 1:31 am EST

  • Posted 21 September 2018, 1:31 am EST

    Hi,

    We have a simple and large file (about 40mb) which contain about 60 000 row by 210 column. with some styles. When opened with the fromJson(json, null) method. The chrome tab freeze until it crash. (it doesn’t have any formulas, other than conditional formats)

    I am currently using :

    @grapecity/spread-sheets”: “^11.2.3”,

    @grapecity/spread-sheets-pdf”: “^11.2.3”,

    @grapecity/spread-sheets-print”: “^11.2.3”,

    @grapecity/spread-excelio”: “^11.2.3”

    Is there known alternative without breaking down the file in multiple ones? I am looking for solutions/idea to support many big reports we want to use in SpreadJS, and to know if this is something planned to be supported at some known point in time.

    I found this post but no resolution have been mentionned in the last year.

    https://www.grapecity.com/en/forums/spread-sheets/import-excel-file-error-ou

    Thanks

  • Posted 21 September 2018, 2:05 am EST

    To add more information, I also have a file (0.8 MB) which derive from the big one. But it still does not open, and I can’t understand why. I basicly cleared the data.

    SmallExample.zip

  • Posted 23 September 2018, 10:36 pm EST

    Hello,

    You can try with following steps while importing the Excel file.

    1. Call import between suspendPaint() and resumePaint() methods.
    2. Use suspendCalcService() and resumeCalcService() methods while loading the Excel file.

    Let me know in case the above does not help.

    Thanks,

    Deepak Sharma

  • Posted 23 September 2018, 11:08 pm EST

    Hi, I should have mentionned it, but they are already in place. Otherwise much smaller workbook would not open.

    Here a sample of my code.

    
    workbook.suspendPaint();
    workbook.suspendCalcService(false);
    
    service.getWorkbookSrv((workbookService) => {
        workbookService.invoke('getWorkbook').then((workbookBase64: any) => {
            let blob = b64toBlob.convert(workbookBase64,
                'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
                null);
    
            let excelIO = new GC.Spread.Excel.IO();
            excelIO.open(blob, (json: any) => {
                workbook.fromJSON(json, null); <-- OutOfMemoryException here
                initializeWorkbookSettings();
                workbook.resumePaint();
                workbook.resumeCalcService(false);
            }, (e: any) => {
                console.error(e);
            });
        });
    });
    
    
  • Posted 24 September 2018, 11:28 pm EST

    Hello,

    I am able to replicate this issue, I will escalate it to the development team for further investigation and let you know.

    Thanks,

    Deepak Sharma

  • Posted 25 September 2018, 8:43 pm EST

    Hello,

    I tried to open this with MS Excel and observed that it takes 1-2 seconds to open the file also it contains some links to external items.

    Before escalating this issue for further investigation, I would like to know how did you create this Excel file(SmallExample.xlsx)?

    Thanks,

    Deepak Sharma

  • Posted 26 September 2018, 1:17 am EST

    You are right, mistake on my part, when I copied style to reproduce the error, it also copied range name which I didn’t realise.

    The document has been created with from a 45mb document which I only cleared the data and saved.

    Here a new version which I still have the problem in the sample inspector without external links NewSmallExample.zip

    If needed, I can provide the bigger file, it is just not possible to link it here.

  • Posted 27 September 2018, 5:13 pm EST

    Hello,

    I have submitted this issue to the development team for further investigation. I will let you know as soon as I get an update on this. The bug id for this issue is 264753.

    Thanks,

    Deepak Sharma

  • Posted 16 November 2018, 3:17 am EST

    Hi,

    Any news on this? Is there a way to track bug id?

    Thanks

  • Posted 18 November 2018, 3:27 pm EST

    Hello,

    The developers have found some issues with the formulas used in Excel. They have asked for some more time. I will let you know you as soon as I get an update on it.

    Thanks,

    Deepak Sharma

  • Posted 13 February 2019, 1:47 am EST

    Hi, is there any news on this?

  • Posted 13 February 2019, 4:36 pm EST

    Hello,

    This issue is still with the development team. I has asked for an update on this, I will inform you once I hear anything on it.

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels