tealeg / xlsx

Go library for reading and writing XLSX files.
Other
5.85k stars 819 forks source link

addNumfmt() in xmlStyle.go seems to be wrong #794

Closed martianwei closed 8 months ago

martianwei commented 8 months ago

The addNumfmt function verifies whether xNumFmt.NumFmtId is less than or equal to builtinNumFmtsCount. If this condition is met, the function will not add it.

螢幕擷取畫面 2024-01-25 135947

However, since my numFmtId is 8, this function prevents me from retrieving the correct NumFmt for my cell.

螢幕擷取畫面 2024-01-25 140625

I believe it would be more effective to check if xNumFmt.NumFmtId is included in builtInNumFmt

螢幕擷取畫面 2024-01-25 140913

Could Anyone help me fix it?

Number_Currency.xlsx

tealeg commented 8 months ago

Fixed by #796.