Spread Pagination - too many pages

Posted by: andrew.wilkowski on 5 December 2019, 8:52 am EST

  • Posted 5 December 2019, 8:52 am EST

    We have a spread control which shows sheets from different template files. One works fine and shows the appropriate number of pages for the page size and number of rows. Another template XLSX file somehow causes the pagination control to show "<< 1, 2, 3, ... 50 >>" even when there are only a few rows of data.

    Any ideas about what formatting or settings could be pulled from our template XLSX file which could cause this behavior? The template contains headers, formatting, and calculations in the first few rows. We tried deleting all rows below the header.
  • Replied 5 December 2019, 11:30 pm EST

    Hi Andrew,
    Actually, we have not faced this situation but it might be because of XLSX file settings. It would be great if you may share the demo template XLSX file to check at our end.

    Also, please try to set the AllowPage property to false for FpSpread1.ActiveSheetView.

    Manish Gupta
  • Replied 6 December 2019, 6:05 am EST

    Thanks for the reply, Manish.

    I believe we've found our issue. There is a formula in our template which was summing rows 1-99999. This caused spread.Rows.Count to be 99999 when we opened the template with spread.OpenExcel().

    I've resolved our issue by changing our formula in the template file


    Is there any way you could resolve this in a future version so that the control does not create extraneous rows when a formula references a large number? I think the user's intention was to "sum the whole column" and I suspect someone else will write it that way in the future.
  • Replied 8 December 2019, 9:44 pm EST

    Hi Andrew,

    We are sorry but this is the default behavior, the no of rows added is the min no of rows required that could correctly display all the data of the Worksheet. In scenarios like this one, we do not have a way to differentiate if the user really needs so many rows or if this is just a formula mistake so adding the required rows is the only possible solution.

Need extra support?

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

Learn More

Forum Channels