Free Support Forum - aspose.com

Smartmarkers not removed when Table has no rows

Hi,

I am upgraded from Aspose.Cells Version 4.1.2.6 to 4.4.1.3. When I have a table with no rows in my dataset, the smartmarkers are no longer removed.

The code I use is:

bookDesigner.SetDataSource(ds);

bookDesigner.Process();

Best Regards,

Torsten

Hi Torsten,

Thanks for considering Aspose.

Well, if the table exists whether it has records or not, the smart markers won't be removed. I think you may check using your own code e.g.., datatable.Rows.Count, and if it has 0 rows, you can remove those smart markers in the template file using Aspose.Cells APIs.

Thank you.

Hi Amjad,

thanks for the answer; that was the reason, why I still had the smart markers. I now check for Rows.Count > 0 before assigning the proper tablename for the smart markers and the smart markers get removed.