Read CSV File With Multiple Encodings
Contents
[
Hide
]
Aspose.Cells - Read CSV File With Multiple Encodings
Sometime, your CSV file contains multiple Encodings (Unicode, ANSI, UTF8, UTF7 etc). Aspose.Cells allows you to load such CSV files and converting them into other formats, for example PDF or XLSX.
Java
//Set Multi Encoded Property to True
TxtLoadOptions options = new TxtLoadOptions();
options.setMultiEncoded(true);
//Load the CSV file into Workbook
Workbook workbook = new Workbook(dataDir + "MultiEncoded.csv", options);
//Save it in XLSX format
workbook.save(dataDir + "EncodedNewFile_Out.xlsx", SaveFormat.XLSX);
Download Running Code
Download Sample Code
For more details, visit Reading CSV File with Multiple Encodings.