Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Export to multiple tab sheets in the same excel
posted

Hi,

I am using excel 2003.I want to export ultrawin grid records to multi[ple tab sheets in the same excel if the maximum limit in a single tab is reached i.e if the records count is more than 65536 rows then export rest of the records to another tab sheet in the same excel.

Please suggest a solution.

 

 

 

 

Parents
  • 469350
    Suggested Answer
    Offline posted

    There's no easy way to do this, but if you have the latest version of the grid, then it should be possible with a bit of clever coding.

    There's a property on the UltraGridExcepExporter called FileLimitBehavior. The default option is to throw an exception, which you don't want. So you would set this to TruncateData. This means that the export will export as many rows as it can to fill up a single worksheet.

    So you could handle the RowExported event and keep track of the last row that was actually exporter. Then... if the data was truncated, you could export the grid to a second worksheet. This time you would have to handle InitializeRow on the ExcelExport and skip each row until you get to the last one that was exported the first time through.

Reply Children