Bug in XlsxFormatter


#1

In XlsxFormatter (Ext.ux.exporter.xlsxFormatter.XlsxFormatter) we have this part of code in format function:

if (!value) {
  if (_.isFunction(fld.renderer)) {
    value = fld.renderer(fvalue)
    value = Ext.String.htmlDecode(value)
  } else {
    value = fvalue
  }
}

But if value = 0 this of course also have been executes. Maybe possible to write some changes, such as:

if (typeof value === 'undefined') {
  if (_.isFunction(fld.renderer)) {
    value = fld.renderer(fvalue)
    value = Ext.String.htmlDecode(value)
  } else {
    value = fvalue
  }
}

Thanks in advance.


#2

Thanks for report!
As far as I understand if we apply this patch we got a wrong cells data for empty date/dateTime field values.
Please, correct date/dateTime problem in your proposition and create a merge request in ubjs public repository