Skip to content

read csv file issue #991

Closed
Closed
@hehhuang

Description

@hehhuang

var Excel = require("exceljs");
// read from a file
var workbook = new Excel.Workbook();
workbook.csv.readFile("3.csv")
.then(worksheet => {
// use workbook or worksheet
console.log(worksheet.getColumn(1).values);
});
/output :
[ <1 empty item>,
'name',
2001-04-30T16:00:00.000Z,
2001-04-30T16:00:00.000Z,
'george's Grocery aa55' ]
/
but the csv file is like this:
name
George's Grocery 005
Quinn's Supermarket #5
george's Grocery aa55
the issue is that if the value contains space+number(or other Special symbol), it will output a date type value.For example "a 123" will output "0122-12-31T15:54:17.000Z". How to resolve this.(xlsx file can work well).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions