OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office-formula] Valid sheet name characters



Kohei Yoshida <kyoshida@novell.com> wrote on 06/06/2008 12:18:35 AM:

> Hi folks,
>
> This discussion came up while working on allowing more special
> characters in a sheet name in Calc, and Eike recommended that I bring
> this up to this list for further discussion.[1]
>
> Here is the story.  Currently, quite a few special characters are
> prohibited in Calc's sheet name, and that causes a problem for
> interoperability with Excel as Excel allowed more special characters
> than Calc does.
>
> Initially, we were planning to allow all special characters to be used
> in a sheet name, to entirely lift the character restriction as a whole.
> I investigated a little, and found out that Excel, while more lenient
> than Calc at present, still disallows all of : \ / ? * [ ] characters.
> Also, a single quote character is not allowed at the first or last
> character position.
>
> So I proposed that we at least place the same restriction as Excel to
> avoid surprises, since Excel can't deal with sheet names that are not
> valid Excel sheet names (Excel converts such sheet name to 'repaired' or
> something, I forget).
>
> The ODF spec, however, doesn't mention anything about disallowed
> characters in the table:name attribute, which implies that all
> characters are allowed in table:name.
>
> The question is, what should we do?  My personal point of view is that
> we should at least mention Excel's restriction on sheet names, and
> probably leave the decision down to the application.  Another
> possibility is to make that an official restriction in the spec, or just
> leave it as is with no restriction (and tell Excel to fix it up).
>


In OOXML sheet names can contain any characters, even control characters if they are hex-encoded.  You mention that Excel disallows some characters, but I wouldn't be surprised if this restriction varies in different versions of Excel.  And who knows what other applications do when writing out XLS or OOXML files.

If we dig deep enough we'll probably find length restrictions as well, on this value as well as almost all string value in ODF.  Excel seems to allow sheet names with no longer than 31 characters.  Other applications may have different restrictions.

One approach to this is to make "portability recommendations" in the text of the standard.  So we keep the existing definition as-is.  A document that has attribute:name is conformant ODF if it is of type xsd:string, regardless of length or what characters are in the first or last position, etc.  But then we say, something like "Portable documents should not use the characters  : \ / ? * [ ] nor should they allow a single quoite character in the first or last position.  Further, portal documents should not have table name's longer than 31 characters".

(Of course such a restriction should be researched some more so it represents the intersection of all relevant spreadsheet implementations, not just Excel's,  So if we found out that (hypothetically) Gnumeric did not allow $ in a sheet name, and only allowed 24 characters, then the portability constraint would account for that as well.)

As you can imagine, this technique can be of wide applicability.  There are likely hundreds of similar statements that could be made, and I doubt we can do this all for ODF 1.2.  But it is something that lends itself to being done as in a separate document as a profile.  So "ODF 1.2 Portability Profile" where we define a conformance class called "Portable ODF Document" and then list the additional constraints placed upon it.  Think PDF/A.

-Rob

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]