• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IBMs bridge2java

Lister Storm
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I was wondering if any of out there had had much success with IBMs bridge2java, as I have just come up against a very frustrating brick wall with trying to read the cell values of an Excel file.

I'm trying to find specific values in the cells of the XLS file, e.g. value is '=my.param.value', but I don't know which cell this value might be in, hence I need to loop through the cells in a sheet to find the value.

As an initial test, I've managed to find the value of a cell by using:
Range eCell = sheet.get_Range(new String("B1"));
log.info("eCell = "+eCell.get_FormulaR1C1());

Obviously this is fine if you know the cell that has the value, but I simply cannot find a successful way to loop through the cells that contain data and get their FormulaR1C1 value.

I've tried doing:
for (int i=1; i<=worksheet.get_UsedRange().get_Count(); i++) {
Range eCell = usedRange.Find(new Integer(ur));
log.info("eCell = "+eCell.get_FormulaR1C1());

And this seemed to work, but I've just tried some futher test files and when it hits a particular cell (can't find out which one unfortunately) it just blows up bridge2java and crashes the server.

If you don't try to access the new eCell properties in the log message (for the one that makes the system crash) the server doesn't crash, but as soon as you try to access any method on the eCell object the server falls over ... hence, I can't possibly work out which cell in the test files is causing the problem.

If anyone can help, I'd very much appreciate it.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic