Issue while rendering the template on the html page

Posted by: dev-evo on 12 September 2019, 8:24 pm EST

    • Post Options:
    • Link

    Posted 12 September 2019, 8:24 pm EST

    I have to import an empty template, its only content are the column names in the first row. My purpose is to load some records from a DB into the cells under these columns, and there are no issues with the html or the JS code.

    The only rows shown by Spreadjs on the page are the ones above the cell where I leave the cursor before saving the Excel template file.

    I attach example screenshots (Page1 with Template1, and Page2 with Template2)

    Example Screenshots.zip

  • Posted 15 September 2019, 6:16 pm EST

    Hi,

    From the screenshots shared, the issue seems to be with the row count, i.e when an excel sheet is imported into spreadJS then created only enough rows/column required to represent the entire data present in the sheet. So in this case, no of rows required is equal to the last selected row.

    Please try by setting the row count before inserting the data. Refer to the following code snippet:

    var sheet = spread.getActiveSheet();
    sheet.setRowCount(200);
    

    If the issue persists, please share a small sample replicating the issue so that we could further investigate the issue.

Need extra support?

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

Learn More

Forum Channels