CotalkerPartners / mongo-xlsx

Convert Mongo data into Excel and vice versa @ Node.js. MongoDB Mongoose Dump to excel.
MIT License
99 stars 28 forks source link

Not converting Date if date is passed in between 01- 09 #12

Closed SyedSaifAli closed 7 years ago

SyedSaifAli commented 7 years ago

I am converting excel data to get data in json form. An issue I am facing is that whenever I am passing the date in between 01-09 , the date is converted into some number.

examplex.xlsx This is the excel data

For the last two row data is correct.But in the 1st row the bike purchasing date is some random number.

Its not converting the date properly.

This is the data which it is converting

data [ { Name: 'Suresh',
    Address: 'mumbai',
    'Purchase date': 42800,
    'Bike Dealership Name': 'sales',
    'Bike Make': 'hero',
    'Bike Model': 'splender' },
  { Name: 'Yash',
    Address: 'bhopal',
    'Purchase date': '15-05-2017',
    'Bike Dealership Name': 'gv',
    'Bike Make': 'HONDA',
    'Bike Model': 'aviator' },
  { Name: 'Saif',
    Address: 'Bhopal',
    'Purchase date': '31-05-2017',
    'Bike Dealership Name': 'vaibhav',
    'Bike Make': 'Honda',
    'Bike Model': 'Dio' } ]