What characters are permitted or not permitted in Excel document names? Has this changed recently?

Alexandria Curmudgeon 20 Reputation points
2026-09-12T18:49:30.82+00:00

A while ago, I created a document name using characters ()-# in the name. More recently, I tried to use same characters in the name of another document, but it keeps being rejected. What amI doing wrong?

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

Answer accepted by question author
John Jefferson Doyon 87,515 Reputation points Independent Advisor
2026-09-12T19:24:39.39+00:00

Hi, @Alexandria Curmudgeon

The characters ( ) - and # are generally allowed in an Excel file name. The characters Microsoft lists as not allowed in OneDrive file names are:

" * : < > ? / \ |

Microsoft also notes that some work or school organizations may still restrict # and %, but that normally would not apply to a personal OneDrive account.

Microsoft reference:

https://support.microsoft.com/en-us/onedrive/restrictions-and-limitations-in-onedrive-and-sharepoint

So there may be something else in the file name or save location causing the rejection.


To help narrow it down:

  1. What is the exact file name you are trying to use, including the .xlsx extension?
  2. Are you saving it to your computer, personal OneDrive, or another location?
  3. What exact error message appears when Excel rejects the name?

Click "Add comment" to let me know.

Thanks!

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-09-12T18:49:45.2933333+00:00

    For an Excel workbook filename, ( ) - and # are not listed as invalid characters in the provided Microsoft support content.

    Characters that are not allowed in file and folder names for OneDrive and SharePoint are:

    " * : < > ? / \ |

    Also not allowed:

    • leading or trailing spaces in the name
    • names ending with a period
    • some reserved names such as AUX, PRN, NUL, CON, COM0-COM9, and LPT0-LPT9

    For Excel specifically, there is also a known issue when opening files from outside Excel if the filename or folder path contains these characters:

    [ ] ? < > : | *

    and Excel may also fail if the full filename and folder path exceed 218 characters.

    What likely explains the difference:

    • - is generally allowed.
    • ( and ) are not listed as invalid in the provided support content.
    • # may be the problem in some locations or services. OneDrive guidance says some organizations do not yet support # and % in names, and Microsoft 365 apps may automatically rename certain characters when saving to personal OneDrive.
    • If the file is being saved to OneDrive or SharePoint instead of only a local Windows folder, those service restrictions can apply even if a similar name worked before.

    If the name is being rejected now, check these conditions:

    1. Remove any of these characters if present anywhere in the filename or folder path: " * : < > ? / \ |
    2. Check whether the file is being saved in OneDrive or SharePoint rather than only locally.
    3. Shorten the full path if the workbook is in deeply nested folders.
    4. Remove any trailing space or trailing period from the filename.
    5. If # is in the name, try saving without it, especially for OneDrive or work/school storage.

    If the workbook is local on Windows, the issue is less likely to be ( ) or -. If it is in OneDrive or SharePoint, # is the most likely character in that set to cause different behavior depending on account type or organization settings.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.