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.
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.
How do we know when the data is truncated? so that we can call export one more time.
Is there any event which we can register for indicating that data is truncated and export is stopped or are there more rows to be exported.
Thanks & Regards,
Prasad
Hi Mike thank you for your support.
Can you provide some more explanation on how to handle after truncating the row?
Can you give some example.