Valid characters for Excel sheet names

后端 未结 4 1693
谎友^
谎友^ 2020-12-09 15:04

In Java, we\'re using the following package to programmatically create excel documents:

org.apache.poi.hssf

If you attempt to set a sheet\'

4条回答
  •  青春惊慌失措
    2020-12-09 15:50

    I think the problem is the colon, not the exclamation point.

    If you open Excel and try to manually edit a sheet name, the only characters it doesn't let you type are [ ] * / \ ? :

    If you paste one of those characters in, you get the following error: (Excel 2003)

    While renaming a sheet or chart, you entered an invalid name. Try one of the following:

    • Make sure the name you entered does not exceed 31 characters.
    • Make sure the name does not contain any of the following characters: : \ / ? * [ or ]
    • Make sure you did not leave the name blank.

提交回复
热议问题