*/
private static void findTest(Workbook w)
{
logger.info("Find test");
Cell c = w.findCellByName("named1");
if (c != null)
{
logger.info("named1 contents: " + c.getContents());
}
c = w.findCellByName("named2");
if (c != null)
{
logger.info("named2 contents: " + c.getContents());
}
c = w.findCellByName("namedrange");
if (c != null)
{
logger.info("named2 contents: " + c.getContents());
}
Range[] range = w.findByName("namedrange");
if (range != null)
{
c = range[0].getTopLeft();
logger.info("namedrange top left contents: " + c.getContents());
c = range[0].getBottomRight();
logger.info("namedrange bottom right contents: " + c.getContents());
}
range = w.findByName("nonadjacentrange");
if (range != null)
{
for (int i = 0; i < range.length; i++)
{
c = range[i].getTopLeft();
logger.info("nonadjacent top left contents: " + c.getContents());
c = range[i].getBottomRight();
logger.info("nonadjacent bottom right contents: " + c.getContents());
}
}
range = w.findByName("horizontalnonadjacentrange");
if (range != null)
{
for (int i = 0; i < range.length; i++)
{
c = range[i].getTopLeft();
logger.info("horizontalnonadjacent top left contents: " +
c.getContents());
c = range[i].getBottomRight();
logger.info("horizontalnonadjacent bottom right contents: " +
c.getContents());
}
}
}