Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 112371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:32:03+00:00 2026-05-11T02:32:03+00:00

In Java, we’re using the following package to programmatically create excel documents: org.apache.poi.hssf If

  • 0

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

org.apache.poi.hssf 

If you attempt to set a sheet’s name (NOT file, but internal Excel sheet), you will get an error if:

  • The name is over 31 characters
  • The name contains any of the following characters: / \ * ? [ ]

However, after creating a document with a sheet name of:

@#$%&()+~`”:;,.|

No error is output, and everything seems fine in Java. When you open the excel file in Office 2003, it will give you an error saying that the sheet name was invalid and that it renamed it to something generic like ‘Sheet 1’.

I don’t know much about the previously stated package that we’re using, but it looks like it’s not correctly filtering invalid Excel sheet names. Any idea of how I can filter out all known invalid characters? I’m hesitant to simply filter out all non-word characters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:32:04+00:00Added an answer on May 11, 2026 at 2:32 am

    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.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 94k
  • Answers 94k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Is this a bad practice? Does it mean that the… May 11, 2026 at 6:46 pm
  • Editorial Team
    Editorial Team added an answer Why replace a perfectly functional native select box with keyboard… May 11, 2026 at 6:46 pm
  • Editorial Team
    Editorial Team added an answer That seems to be working earlier in your code. Are… May 11, 2026 at 6:46 pm

Related Questions

In Java, we can always use an array to store object reference. Then we
In Java, we're using the following package to programmatically create excel documents: org.apache.poi.hssf If
In Java if an input argument to a method is invalid, we can throw
We currently have batchjobs in Java that proces mulitple (sometimes large) files. These jobs
At work we do almost everything in Java and perl, but I wanted to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.