Getting error when parsing blank cell in a csv

Hi, im using aspose-cell to convert csv to xlxs. using below code.

String path=new File("src/main/java/Resources/"+fileName+".csv").getAbsolutePath();
LoadOptions options=new LoadOptions(FileFormatType.CSV);
        Workbook workbook = new Workbook(path, options);
        workbook.getSettings().setCheckExcelRestriction(false);
        workbook.save("src/main/java/Resources/"+fileName+".xlsx", SaveFormat.XLSX);

But the cell where it giving the error does not contain any values. Its a blank cell.
can you please help.

Attached the csv trying to convert to xlxs

Error : You want to put a string longer than 32K to Cell F658. MS Excel only allows to put a string shorter than 32K to a Cell.

Dependencies

com.aspose
aspose-cells
21.6

@Ano,

Thanks for the sample file.

Please try the updated sample code, it works as expected and I do not get any exception:
e.g.
Sample code:

        String path=new File("f:\\files\\testtt.csv").getAbsolutePath();
        LoadOptions options=new LoadOptions(FileFormatType.CSV);
        options.setCheckExcelRestriction(false);
        Workbook workbook = new Workbook(path, options);
        workbook.save("f:\\files\\out1.xlsx", SaveFormat.XLSX); 

Let us know if you still find any issue.

Thanks Amjad, its working as expected now :slight_smile:

@Ano,

Good to know that your issue is sorted out by the suggested code segment. Feel free to write us back if you have further queries or issue, we will be happy to assist you soon.