diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index 653bf68cb..11a31704a 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -6754,11 +6754,11 @@
  • How to retrieve data from merged cells using XlsIO?
  • -
  • +
  • How to convert inches to points in Syncfusion XlsIO? -
  • -
  • - How to preserve line breaks when saving Excel as CSV? +
  • +
  • + How to preserve line breaks when saving Excel as CSV?
  • Why does text with double quotes get enclosed in double quotes when saving as CSV? @@ -6772,6 +6772,9 @@
  • How to merge cells preserving topleft value and format in XlsIO?
  • +
  • + Which characters should be avoided when naming worksheets? +
  • diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/which-characters-should-be-avoided-when-naming-worksheets.md b/Document-Processing/Excel/Excel-Library/NET/faqs/which-characters-should-be-avoided-when-naming-worksheets.md new file mode 100644 index 000000000..9e9f0e46d --- /dev/null +++ b/Document-Processing/Excel/Excel-Library/NET/faqs/which-characters-should-be-avoided-when-naming-worksheets.md @@ -0,0 +1,46 @@ +--- +title: Invalid characters to avoid in worksheet names | Syncfusion +description: Worksheet names containing '/' or ':' may corrupt workbooks. This FAQ explains the invalid characters to avoid. +platform: document-processing +control: XlsIO +documentation: UG +--- + +# Which characters should be avoided when naming worksheets? + +Worksheets that include invalid characters such as `:` or `/` in their names can cause workbook corruption when opened in some viewers or when round-tripping between formats. Use XlsIO to validate and sanitize worksheet names before saving. + +## Invalid Characters in Worksheet Names + +Excel does not allow the following seven characters in worksheet names: + +| Character | Symbol | Issue | +|---|---|---| +| Colon | `:` | Causes path confusion in some file systems | +| Backslash | `\` | Used as path separator, causes file system errors | +| Forward Slash | `/` | Used as directory separator, creates ambiguity | +| Question Mark | `?` | Wildcard character, causes parsing issues | +| Asterisk | `*` | Wildcard character, causes file system conflicts | +| Opening Bracket | `[` | Reserved for special Excel references | +| Closing Bracket | `]` | Reserved for special Excel references | + +## Why These Characters Cause Corruption + +When worksheets contain these forbidden characters, the following issues occur: + +1. **File Format Issues**: Excel and other spreadsheet applications may fail to parse the workbook correctly +2. **Round-trip Conversion Errors**: Converting between formats (XLSX to XLS and back) may corrupt the data +3. **File System Conflicts**: Path separators (`:`, `\`, `/`) conflict with operating system file naming conventions +4. **External Tool Failures**: Third-party tools and APIs may not be able to read or write the workbook +5. **Sharing Problems**: Files become incompatible when shared across different platforms or applications + +## Best Practices for Worksheet Names + +Follow these guidelines when naming worksheets: + +- **Use alphanumeric characters** (letters A-Z, a-z, numbers 0-9) +- **Use safe special characters** (underscore `_`, hyphen `-`, space ` `) +- **Avoid all seven forbidden characters** listed above +- **Keep names under 31 characters** (Excel's maximum limit) +- **Ensure names are not empty** (at least 1 character required) +- **Make names meaningful** (use clear, descriptive titles like "Sales Data", "Q1_2026", "Report_Jan")