import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
+import org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException;
import org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STTrueFalse;
/**
}
CTClientData cldata = sh.getClientDataArray(0);
- if(cldata.getObjectType() != STObjectType.NOTE) {
+ try {
+ if (cldata.getObjectType() != STObjectType.NOTE) {
+ return false;
+ }
+ } catch (XmlValueOutOfRangeException e) {
+ // see https://bz.apache.org/bugzilla/show_bug.cgi?id=66827
return false;
}
for (int i = 0; i < expectedCount; i++) {
assertNotNull(sst.getItemAt(i));
}
-
+ XSSFSheet ws = wb.getSheetAt(0);
+ int nRowCount = ws.getLastRowNum(); // does not include header row in the count
+ for (int r = 1; r <= nRowCount; r++) {
+ XSSFRow row = ws.getRow(r);
+ if (row != null) {
+ XSSFCell cellSymbol = row.getCell(0);
+ if (cellSymbol != null) {
+ XSSFComment comment = cellSymbol.getCellComment();
+ }
+ }
+ }
}
}