Hi,
I encountered a strange behaviour for setDataArray(Object[][]) while
inserting several types of data. It seems like Strings, that contain
numbers only are inserted with a leading ' .
If i want to insert " "5" " , " '5 " will be inserted. If i just insert
"5", the number will be inserted correctly.
I wrote a litte testing snippet:
XCellRange cellRange2 = sheet.getCellRangeByPosition(0, 0,
1, 1);
XCellRangeData data2 = (XCellRangeData)
UnoRuntime.queryInterface(XCellRangeData.class, cellRange2);
Object[][] val = new Object[2][2];
val[0][0] = "5";
val[0][1] = 5;
val[1][0] = " 5";
val[1][1] = "'5";
data2.setDataArray(val);
val[0][0] will be inserted as " '5 ", where as it should be inserted
just as "5" in my opinion.
Same with val[1][0]. It's inserted as " '5".
Is this a bug or is it working as inteded and it's just me not
understanding proper usage of this method?
Any information would be appreciated.
Specifications:
OOo 3.1.1(OOO310m19 Build9420), Java 1.5_017 and Windows XP.
I'm executing the code in OOoBean environment, but I think that
shouldn't matter.
Steffen Börsig
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]