Free Support Forum -

Empty CSV columns with LightCellsDataProvider


Aspose Cells produces empty trailing columns in CSV when using LightCellsDataProvider.

This bug has been introduced in version 20.4 and it still present in version 20.10.

Code used (

Workbook wb = new Workbook();
TxtSaveOptions options = new TxtSaveOptions(SaveFormat.CSV);
options.setLightCellsDataProvider(new LightCellsDataProviderDemo(wb, 1, 3, 3));"test.csv", options);



Best Regards


As you are rendering to CSV file format, so could you paste/attach complete sample (runnable) code (Java demo (class) and Interface that implements “LightCellsDataProvider”), we will check it soon.

Also, was it working differently? Please also share the output file by some older version (as per your expectations).


Result from version 20.3 and before:


I used your example implementation from Github:


Could you also paste code for the main class where you implements light cells data provider and save to CSV file format, we will check it soon. (1.3 KB)


I tried your exact code (using both latest fix and older version) and got “NullPointerException” when saving to CSV file. If I use OoxmlSaveOptions to save to XLSX file, it works fine. So, there is something not supported when saving to CSV file format. See the screenshot for your reference:
sc_shot1.png (55.2 KB)

Does it work fine on your end. I am using latest version/fix: Aspose.Cells for Java v20.10.8. I also tried some older fix (Aspose.Cells for Java v20.2.x) and got the same exception.

Well, you have to setup your license correctly first.
see here:


Please notice, after setting the license, I am able to reproduce the issue as you have mentioned. Aspose.Cells produces empty trailing columns of (commas) in CSV when using LightCellsDataProvider, It works fine (pointed out) with older version (e.g Aspose.Cells for Java v20.2.x) though as I tested. I have logged a ticket with an id “CELLSJAVA-43341”.

Once we have an update on it, we will let you know.

This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

1 Like


Please try our latest version/fix: Aspose.Cells for Java v20.11.2 (attached) (7.0 MB)

Your issue should be fixed in it.

Let us know your feedback.