Using Aspose.Cells - Converting stream to csv is adding empty space at the end of file

Hi Team,

We are trying to convert the memoryStream to Csv like the below code but after saving the file to csv it is adding one empty row … tried to delete the empty row using TxtSaveOptions.TrimLeadingBlankRowAndColumn to true … but that is not deleting this empty row at the end of file … is there a way we can achieve this?

using MemoryStream testStream = new MemoryStream();
using Workbook workbook = new Workbook(memoryStream);
workbook.Save(testStream, SaveFormat.Csv);

@anam77899,

Could you please provide zip and attach input Excel file and output CSV file. We will check it soon.

@anam77899
Maybe there is some blank rows in your template file from which you build the memory stream. Would you please try Cells.DeleteBlankRows() for the worksheet before saving the csv to see whether you can get the expected result?