tealeg / xlsx

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

Could Row.ReadStruct return default int/float value when cell content is null? #715

Closed donychen1134 closed 1 year ago

donychen1134 commented 3 years ago

Hello,

When I use Row.ReadStruct to parse one row into struct, I found that there is no default value for int/float.

Maybe we can return the default value when cell content is null? eg: return 0 when int; return false when bool.

Krevedos commented 2 years ago

I faced the same problem, is it possible to add to readStruct support sql.NullFloat and another?

tealeg commented 2 years ago

See https://github.com/tealeg/xlsx/discussions/663

If someone wants to do the work, that's fine by me, I'll review and cut releases as appropriate.

seadog0331 commented 2 years ago

+1

itsdax commented 2 years ago

+1

github-actions[bot] commented 1 year ago

Stale issue message