Author Topic: Tab name lengths over 31 chars corrupt Excel export  (Read 403 times)

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
Tab name lengths over 31 chars corrupt Excel export
« on: November 10, 2022, 11:54:51 pm »
Export functionality in getWBook() should limit sheet names to 31 characters so that when the spreadsheet is opened in Excel, it does not cause an error. Excel requires tab names < 32 characters long.

I modified getWBook to call a getUniqueSheetName function that keeps track of used names and returns:

verylongnamethatcrashesexcelverylongnamethatcrashesexcel
anotherverylongnamethatcrashesexcelverylongnamethatcrashesexcel
athirdverylongnamethatcrashesexcelverylongnamethatcrashesexcel
-->
verylongnamethatcrashesexcelver
verylongnamethatcrashesexcelve2
verylongnamethatcrashesexcelve3

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6210
    • View Profile
Re: Tab name lengths over 31 chars corrupt Excel export
« Reply #1 on: November 21, 2022, 12:36:39 pm »
Tabs UI doesn't allow tab names more than 31 characters.

This issue doesn't arise unless worksheet names are updated in the javascript workbook directly.