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

Free Support Forum - aspose.com

Xlsx to CSV conversion - missing comma in the output


I saw an issue where Aspose output does not seem to be correct when converting Xlsx to Csv. The result is different from Excel ‘save as’ Csv.

From the attached picture you should be able to see that there is an extra comma on line 2.
If it’s because of the red cell on A2, then why isn’t there an extra comma for lines 3 and 4 because of the red cells on column D? Would it be possible to suggest a workaround which can replicate the results coming from Excel or anything close to it (e.g. the commas to be consistent)?

var options = new TxtSaveOptions { KeepSeparatorsForBlankRow = true }
using (var convertedDocument = new Workbook(m_sourceFile))
convertedDocument.Save(“outputFile.csv”, options);

I’ve attached the test files and screenshots for your reference.
imgComma.png (20.4 KB)
testFilesComma.zip (6.3 KB)

Thank you,

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-47269 – Xlsx to CSV conversion - missing comma in the output


We have fixed the inconsistent commas issue in the upcoming fix. For exporting CSV, we only export the range with cell values and ignore those cells which have only formattings. If you need the same results with MS Excel (more commas for blank cells), we need to provide new API for it and the new option may cause the exporting consume a bit more time. Could you confirm if this (can you live with performance degradation) is ok for you?

Hi @Amjad_Sahi

Thanks for your update.

I think in many cases we do not necessarily need that many commas like what we have in Excel output. However, since Aspose is mimicking Office Excel behaviour, it would indeed to be good to have such option to be able to provide the identical output (same no. of commas for blank cells) as Excel.

I could imagine introducing such option would involve checking styles for cells and may downgrade the performance, however, I think as long as the performance stays the same when we don’t enable the option, it should be reasonable and acceptable.


Thank you for the feedback. A new ticket is logged for this new feature. We will write back here as soon as any feedback will be ready to share.

CELLSNET-47276 - XLSX to CSV, commas required for blank cells also similar to MS Excel


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

The issues you have found earlier (filed as CELLSNET-47276,CELLSNET-47269) have been fixed in Aspose.Cells for .NET v20.4. This message was posted using Bugs notification tool by Amjad_Sahi