summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/util/constants.rb
diff options
context:
space:
mode:
authorHayden Ball <[email protected]>2012-12-12 15:27:14 +0000
committerHayden Ball <[email protected]>2012-12-12 15:27:14 +0000
commit7362349b5c58f95f1eb8bbc35d5074a5e094d01f (patch)
tree794f5e13399fd4459c5a8461a36b03016ab4c1bd /lib/axlsx/util/constants.rb
parent798e96feccea88648e64f1eb02707375f52cd50c (diff)
downloadcaxlsx-7362349b5c58f95f1eb8bbc35d5074a5e094d01f.tar.gz
caxlsx-7362349b5c58f95f1eb8bbc35d5074a5e094d01f.zip
Test for invalid characters in the sheet name.
With thanks to http://stackoverflow.com/a/451488/1322410 for providing the list of characters
Diffstat (limited to 'lib/axlsx/util/constants.rb')
-rw-r--r--lib/axlsx/util/constants.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb
index 437de6db..f9bffa87 100644
--- a/lib/axlsx/util/constants.rb
+++ b/lib/axlsx/util/constants.rb
@@ -285,9 +285,8 @@ module Axlsx
# error message for sheets that use a name which is longer than 31 bytes
ERR_SHEET_NAME_TOO_LONG = "Your worksheet name '%s' is too long. Worksheet names must be 31 characters (bytes) or less"
- # error message for sheets that use a name which includes a colon
-
- ERR_SHEET_NAME_COLON_FORBIDDEN = "Your worksheet name '%s' contains a colon, which is not allowed by MS Excel and will cause repair warnings. Please change the name of your sheet."
+ # error message for sheets that use a name which include invalid characters
+ ERR_SHEET_NAME_CHARACTER_FORBIDDEN = "Your worksheet name '%s' contains a character which is not allowed by MS Excel and will cause repair warnings. Please change the name of your sheet."
# error message for duplicate sheet names
ERR_DUPLICATE_SHEET_NAME = "There is already a worksheet in this workbook named '%s'. Please use a unique name"