Question about reading .xls file with golang

While reading .xls file with golang using ReadAllCells function from xls package.
Link of function :-

Issue - For strings it works fine , but for the cell having int value get’s changed to date&time format.

ex:- (1 get changed to 1900-01-01T00:00:00Z)

How we will deal with this problem ?

EDIT: I literally took my first sip of coffee for the day and it occurred to me to check that project’s issues. Looks like there’s an issue here that custom numeric formats are incorrectly assumed to be dates.

It looks like that happens when the cell format is one of these number formats:

} else if 14 <= fNo && fNo <= 17 || fNo == 22 || 27 <= fNo && fNo <= 36 || 50 <= fNo && fNo <= 58 { // jp. date format

There is a comment in the source code that references this specification document and I found the specific codes on pages 174-175. The code looks right to me.

Can you check format of the cells in the .xls file to see if they’re one of the date formats?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.