We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

SmartMarker: how to replace null value with specific value

I have a datasource with some columns which include some null value. What I want to implement is that
after SmartMarker processing, the result now is including null value, I want to replace the null value with specific value in the Excel result or Html result. Is there is an automatic way to implement this ? Before sending this topic I try to process the datasource directly by manually replacing the null value, but I found this can effect the SmartMarker processing eg: &=A(group) 、subtotal and I may get a wrong result or an exception. So I found, to implement this I must process the result that has been processed by the aspose rather than the datasource prepared for the SmartMarker.

AsposeTest 2.zip (124.5 KB)
Above is a sample code, the result now is the output file:
image.png (80.8 KB)
what I want is the A6 null value can be replaced with eg: helloworld
image.png (55.5 KB)

Hope for your help, thanks!

@kevinzhang,

I am afraid, there is no such option available in Smart Markers that could set default values for the null values. To cope with it, you may try:
After you have processed markers and data is filled into the cells, you may browse cells in the range/cols/rows in the worksheet, check for null value and then replace null value with your desired value via Aspose.Cells APIs.