xlsx icon indicating copy to clipboard operation
xlsx copied to clipboard

Can detect type when raw cell type is empty, instead of "Numberic" by default?

Open someblue opened this issue 1 year ago • 0 comments

Thanks for the awesome library! It saved my time a lot! I find an issue with the default cell type behaviour.

I have a system generated xlsx file containing a formula cell type. image

It's ok in Microsoft Excel. But using tealeg/xlsx, cell. FormattedValue() return str="", err=nil. Expected return str="I18N", err=nil as in excel.

After debugging, I found that the raw cell has no type information for the cell. And then by default, the type will be treated as "numberic", so the formula are ignored when parsing. image

Maybe the system generates the xlsx file incorrectly, but I cannot contact with the admin of system to change the behaviour. And it work well in Microsoft Excel.

Is it possible to change the default behaviour: check if the rawCell.F exists, set type as "Formula" if so?

someblue avatar Jun 17 '24 12:06 someblue