git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@437519
13f79535-47bb-0310-9956-
ffa450edef68
StringBuffer retval = new StringBuffer();
SheetReferences refs = book == null ? null : book.getSheetReferences();
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((new CellReference(getRow(),getColumn(),!isRowRelative(),!isColRelative())).toString());