If I want to named a sheet starting with the ' [apostrophe] character, a dialog showing an "invalid sheet name" shows, stating that the name must not be a duplicate or contain certain characters, which ' [apostrophe] is not listed.
In fact, I can place a ' anywhere in the name as long as is not the first character, and libreoffice doesn't have a problem with it.
As a workaround, I start the name with a space followed by ' [apostrophe] and that does the trick. Nonetheless, this is a bug.
Steps to Reproduce:
1.Rename any sheet
2.Make sure the first character in the name is ' [apostrophe]
The "Invalid sheet name" dialog should appear
The sheet should be renamed without any problems. The ' [apostrophe] character is not an invalid one.
User Profile Reset: Yes
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
Reproducible with master under Ubuntu 16.04. The error message is displayed if the apostrophe is the first or the last character. And, indeed, the apostrophe is not in the given list of invalid characters.
Best regards. JBF
Apostrophe isn't allowed as first or last character because Excel can't handle it (probably due to the sheet name when used in references can be single quoted and a single ' quote contained is escaped by doubling it '' and they can't cope with that if it's right at the start or end of a single quoted name). Won't change. We may add a hint to the dialog though.
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":
Apostrophe ' is invalid as first or last character in sheet name, tdf#103027
It will be available in 6.0.0.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.