Importing a csv file

Hi,

Aspose Cells version 7.3.1
Using the importcsv method, leading zero’s are being dropped from numeric values. All techniques to resolve this have failed e.g. adding single quote '000111 the single quote is actually included in the cell data !!
Has this been resolved in later versions?

Hi,


I think you may try to use our latest version e.g v8.0.2 (JAVA) with the following overloads if it works fine. See the description of the method overloads for importCSV:
e.g

importCSV

public void importCSV(java.lang.String fileName, java.lang.String spliter, boolean convertNumericData, int firstRow, int firstColumn)
throws java.lang.Exception
Import a CSV file to the cells.
Parameters:
fileName - The CSV file name.
spliter - The spliter
convertNumericData - Whether the string in text file is converted to numeric data.
firstRow - The row number of the first cell to import in.
firstColumn - The column number of the first cell to import in.

importCSV

public void importCSV(java.io.InputStream stream, java.lang.String spliter, boolean convertNumericData, int firstRow, int firstColumn)
throws java.lang.Exception
Import a CSV file to the cells.
Parameters:
stream - The CSV file stream.
spliter - The spliter
convertNumericData - Whether the string in text file is converted to numeric data.
firstRow - The row number of the first cell to import in.
firstColumn - The column number of the first cell to import in.

Note: you should set the parameter “convertNumericData” to false when using those methods.

Thank you.