mirror of https://github.com/apache/poi.git
Bug36646: Ret3dPtg to include quotes when sheetname contains a space.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@437519 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f62e014f5d
commit
4db9e61904
|
@ -160,7 +160,13 @@ public class Ref3DPtg extends Ptg {
|
||||||
StringBuffer retval = new StringBuffer();
|
StringBuffer retval = new StringBuffer();
|
||||||
SheetReferences refs = book == null ? null : book.getSheetReferences();
|
SheetReferences refs = book == null ? null : book.getSheetReferences();
|
||||||
if (refs != null) {
|
if (refs != null) {
|
||||||
retval.append(refs.getSheetName((int)this.field_1_index_extern_sheet));
|
String sheetName =refs.getSheetName((int)this.field_1_index_extern_sheet);
|
||||||
|
boolean appendQuotes = sheetName.contains(" ");
|
||||||
|
if (appendQuotes)
|
||||||
|
retval.append("'");
|
||||||
|
retval.append(sheetName);
|
||||||
|
if (appendQuotes)
|
||||||
|
retval.append("'");
|
||||||
retval.append('!');
|
retval.append('!');
|
||||||
}
|
}
|
||||||
retval.append((new CellReference(getRow(),getColumn(),!isRowRelative(),!isColRelative())).toString());
|
retval.append((new CellReference(getRow(),getColumn(),!isRowRelative(),!isColRelative())).toString());
|
||||||
|
|
Loading…
Reference in New Issue