Author Topic: PSA: Grid Title over 30 chars causes Excel export to fail  (Read 1669 times)

MEngelbyPQ

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
PSA: Grid Title over 30 chars causes Excel export to fail
« on: August 03, 2019, 02:39:28 am »
Well, not exactly fail.  It causes Excel to complain about something (it won't say) and by pressing ok on the dialog warning, the worksheet will load.  But for unknowing users, this is very concerning.  When the grid title is too long, and exportData is invoked, the warning that shows up is:
"We found a problem with some content in '{workbook name}.xlsx'. Do you want us to try to recover as much as we can? if you trust the source of the workbook, click Yes."

The PSA is: keep your Grid Titles less than 31 characters or specify the 'sheetName' option in the exportData method.

Ps.  It took me an embarrassingly long amount of time to figure this out.
« Last Edit: August 03, 2019, 02:43:04 am by MEngelbyPQ »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: PSA: Grid Title over 30 chars causes Excel export to fail
« Reply #1 on: August 07, 2019, 10:58:00 am »
Thanks for your valuable information / feedback.

Currently it can be overcome by limiting the title before call to exportData method.

Code: [Select]
  this.option('title', this.option('title').substr(0,31) );