2007 works for me, but the behavior may depend on Excel update number or service pack.
OK, I'm convinced to revert my changes. The fix is coming soon. I created a new Bugzilla ticket to track progress: https://issues.apache.org/bugzilla/show_bug.cgi?id=51415 Yegor On Wed, Jun 22, 2011 at 3:09 PM, snelligan <[email protected]> wrote: > Attached is a problem which shows the 31 character problem. > > > > We are running Excel 2007 and having the problem. > > > > -Steve Nelligan > > > > > > Steven M. Nelligan > > > > From: Yegor Kozlov-4 [via Apache POI] > [mailto:[email protected]] > Sent: Wednesday, June 22, 2011 3:11 AM > To: Nelligan, Steve M (Facilities & Services) > Subject: Re: Problem creating an .xlsx file using POI and XSSF > > > > On Tue, Jun 21, 2011 at 9:50 PM, Jon Svede <[hidden email]> wrote: >> The javdoc spells out that limitation but I agree with you, I think it > should >> throw an exception. >> > Not exactly, the rule is more complex. > > Non Excel clients such as OpenOffice allow opening / editing of > worksheets with names longer than 31 characters. > > Some time back I loosened the 31 characters constraint to support > that. That seemed to be OK for Excel 2003, Excel 2007 and OpenOffice. > They all were able to open workbooks with long sheet names. Now I'm > testing in Excel 2010 and it fails to open .xlsx. > > The test synopsis is below: > > XLS format: > > [OK] Excel 2003 can open .xls files with long sheet names without > error or warning. The sheet tab shows the full name. > [OK] Excel 2007 can open .xls files with long sheet names without > error or warning. The sheet name is silently truncated to 31 > characters. > [OK] Excel 2010 can open .xls files with long sheet names without > error or warning. The sheet name is silently truncated to 31 > characters. > > XLSX format: > > [OK] Excel 2007 can open .xls files with long sheet names without > error or warning. The sheet name is silently truncated to 31 > characters. > [FAILURE] Excel 2010 failes to open .xlsx files with sheet names > longer than 31 characters. > > I'm inclined to revert my previous change and always enforce the 31 > characters rule. The question is what to do if the sheetName argument > is long? Throw IllegalArgumentException or silently truncate to 31 > chars? > > Yegor > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > > > > ________________________________ > > If you reply to this email, your message will be added to the discussion > below: > > http://apache-poi.1045710.n5.nabble.com/Problem-creating-an-xlsx-file-us > ing-POI-and-XSSF-tp4506461p4513283.html > > To unsubscribe from Problem creating an .xlsx file using POI and XSSF, > click here > <http://apache-poi.1045710.n5.nabble.com/template/NamlServlet.jtp?macro= > unsubscribe_by_code&node=4506461&code=c25lbGxpZ2FAaWxsaW5vaXMuZWR1fDQ1MD > Y0NjF8MjYyNDY3NjE4> . > > > > -- > View this message in context: > http://apache-poi.1045710.n5.nabble.com/Problem-creating-an-xlsx-file-using-POI-and-XSSF-tp4506461p4513669.html > Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
