Saving a CSV file with cells that contains more than 32K chars

Hi, I have the following error while saving a CSV file that contains some cells with more than 32K chars (I've tested with CheckExcelRestriction with no success).

I've tested with the following code :

Workbook workbook = null;
if (format == ExportFormat.CSV)
workbook = new Workbook(null, new TxtLoadOptions() { CheckExcelRestriction = false });
else
workbook = new Workbook();
workbook.Settings.Encoding = Encoding.Unicode;
workbook.Worksheets[0].Name = "Export";
workbook.SaveOptions.ClearData = true;
workbook.SaveOptions.CachedFileFolder = Path.GetTempPath();
workbook.ImportDataTable(datatable, 65535);
TxtSaveOptions saveOptions = new TxtSaveOptions();
saveOptions.Separator = _delimiter;
workbook.Save(filename + ".csv", saveOptions);Workbook workbook = null;
if (format == ExportFormat.CSV)
workbook = new Workbook(null, new TxtLoadOptions() { CheckExcelRestriction = false });
else
workbook = new Workbook();
workbook.Settings.Encoding = Encoding.Unicode;
workbook.Worksheets[0].Name = "Export";
workbook.SaveOptions.ClearData = true;
workbook.SaveOptions.CachedFileFolder = Path.GetTempPath();
workbook.ImportDataTable(datatable, 65535);
TxtSaveOptions saveOptions = new TxtSaveOptions();
saveOptions.Separator = _delimiter;
workbook.Save(filename + ".csv", saveOptions);

Thanks

Hi,

Thanks for providing your some details and sample code.

Please try our latest fix/version: Aspose.Cells for .NET v7.5.0.4
Also, please use the line before saving the file.
E.g
workbook.Settings.CheckExcelRestriction = false;

If you still find the issue, kindly attach your template CSV file here, we will check your issue soon.

Thank you.

Using your line it has worked.

Thanks

Hi,


Good to know that it sorts out your issue.
Feel free to contact us any time if you need further help or have some other issue, we will be happy to assist you soon.

Thank you.