JAVASCRIPT reading excel cell value as date

In order to read excel cell value as it is there in the cell instead of date, remove .value. So, that it will just read the value as it is in the cell instead of formatting it.

Replace XLSheet.Cells(rowIndex, colIndex).value to XLSheet.Cells(rowIndex, colIndex).

Just remove .value, so that it will return the value as it is there in the excel file.

If the above solution didn't work, use the below link to format the date

http://www.infallibletechie.com/2016/01/activex-date-formatting.html

Cheers!!!

No comments:

Post a Comment