Empty CSV columns with LightCellsDataProvider

Hello,

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 (LightCellsDataProviderDemo.java):

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

Result:

        ,test_0_1,test_0_2,,,,,,,,...
test_1_0,test_1_1,test_1_2,,,,,,,,...
test_2_0,test_2_1,test_2_2,,,,,,,,...

Best Regards

@flammang,

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).

Hi,

Result from version 20.3 and before:

        ,test_0_1,test_0_2
test_1_0,test_1_1,test_1_2
test_2_0,test_2_1,test_2_2

I used your example implementation from Github:

@flammang,

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.

LightCellsDataProviderDemo.zip (1.3 KB)

@flammang,

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:

@flammang,

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.

@flammang,
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

@flammang,

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

Your issue should be fixed in it.

Let us know your feedback.

I confirm that this version (v20.11.2) fixes the issue.
When can we expect a release?

@flammang,
We only publish official releases on Nuget\maven repos. The hotfix, i.e., Aspose.Cells for Java v20.11.2 is fully tested and includes all the features (full fledged) and previous fixes and enhancements, so you may use it on production server. It is safe to use the hotfix on the server. However, we will publish our next official release, i.e., Aspose.Cells for Java v20.12 (which will also include your fix) in about a week.

The issues you have found earlier (filed as CELLSJAVA-43341) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi