Bug 136507 - FILESAVE: Rename Sheet function in Calc is not saving names longer than 31 characters
Summary: FILESAVE: Rename Sheet function in Calc is not saving names longer than 31 ch...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All Windows (All)
: medium trivial
Assignee: Not Assigned
Depends on:
Reported: 2020-09-06 10:13 UTC by Martin Terry
Modified: 2024-04-16 03:17 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Screen shots referred to in description (660.29 KB, application/vnd.oasis.opendocument.text)
2020-09-06 10:14 UTC, Martin Terry
Screen shot of Help/About (378.54 KB, application/vnd.oasis.opendocument.text)
2020-09-07 10:50 UTC, Martin Terry

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Terry 2020-09-06 10:13:05 UTC
After renaming a sheet in an xlsx file with a name longer than 31 characters the new name was displayed as expected on the sheet tab, but after saving, closing and re-op 

Steps to Reproduce:
1. Open existing xlsx spreadsheet in Calc.
2. Any sheet - click on Sheet/Rename Sheet
3. Rename Sheet dialog opens 
4. Enter a name longer than 31 characters (screen 1)
5. OK -> sheet name updates in view to show full name that was entered (screen 2)
6. Save
7. Close
8. Re-open and Sheet name displayed is truncated to first 31 chars (screen 3)
9. Click on Sheet/Rename Sheet and only truncated Sheet Name is displayed
10. Checked Insert Sheet and got same behaviour, with name truncated when file re-opened.

Have attached file showing 3 screen shots
Tried looking through existing bugs but a large number of matches to various searches makes it difficult. Did find 84874 which is not quite the same but in the same area.
Only minor issue. Noticed it when my sheet name lost final character.
Not sure what the maximum length of sheet names is, but the Insert and Rename Sheet dialogs should limit length of name to the maximum. (I realise it could be a different issue altogether)

Actual Results:
When re-open file the Sheet name displayed is truncated to first 31 chars of string entered

Expected Results:
Not sure because I don't know what the maximum length of the Sheet Name should be. Whatever a user can enter in Insert Sheet or Create Sheet dialog should be preserved through a Save/Close/Reopen sequence  

Reproducible: Always

User Profile Reset: No

Additional Info:
See above

Hope I have provided enough information. Thanks for all your work on the LO suite. I am a big fan of LO and have used it for several years!
Comment 1 Martin Terry 2020-09-06 10:14:51 UTC
Created attachment 165189 [details]
Screen shots referred to in description
Comment 2 Julien Nabet 2020-09-06 10:30:52 UTC
It seems this limitation is due to being compatible with Excel, see:
- https://excelribbon.tips.net/T013175_Using_Very_Long_Worksheet_Tab_Names.html
- https://stackoverflow.com/questions/3681868/is-there-a-limit-on-an-excel-worksheets-name-length

So I'd say NOTABUG.
Comment 3 Ming Hua 2020-09-06 17:05:32 UTC
The 31-character limit is from the Excel/.xlsx side, bug 79998 is also relevant.
Comment 4 Roman Kuznetsov 2020-09-06 18:26:50 UTC
Martin, please write here info from your LibreOffice's Help->About dialog
Comment 6 Roman Kuznetsov 2020-09-06 20:32:01 UTC
So let's close it as NOT A BUG by Comment 2 and Comment 5
Comment 7 Martin Terry 2020-09-07 10:50:06 UTC
Created attachment 165226 [details]
Screen shot of Help/About

Screen shot of Help/About as requested
Comment 8 Martin Terry 2020-09-07 11:08:40 UTC
I have added screen shot of Help/About as requested in Comment #4

I note that you have classified this as not a bug due to Excel standards. That might be true, but from user point of view it is disconcerting when data is truncated.

I tried the same thing having saved my spreadsheet as a .ods file and the Sheet Name does not truncate. I do however prefer to stick with Excel formats for my spreadsheets.

I would suggest that a good thing to do would be to update the Renaming Sheets help topic to add a warning note that only 31 characters can be saved in Excel formats.
Comment 9 Mike Kaganski 2020-09-07 11:22:38 UTC
(In reply to Martin Terry from comment #8)

Saving to any non-native format is accompanied with a warning about possible data/formatting loss. If people decide to use non-native formats as defaults, or disable the warning, they state that they know the downsides, and are okay with them.

Also why only care about Excel? There are multiple other formats that spreadsheets may be exported to. CSVs (without any formatting, or multiple sheets); DBFs; Numbers; ... - so trying to cover every aspect of incompatibility of those formats with the full capabilities of Calc would make "help" actually unhelpful, full of technical data and TL;DR.

(But I still would love to see the warning about incompatibilities having details about detected problems...)
Comment 10 Martin Terry 2020-09-07 11:27:43 UTC
Well, that has put me in my place!