tag:blogger.com,1999:blog-165807313160822069.post4618590334967563262..comments2024-01-22T04:01:01.636-05:00Comments on Ubuntu: A Love/Hate Relationship: JRuby and OpenOfficeRob Brittonhttp://www.blogger.com/profile/06467713562648469830noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-165807313160822069.post-32477358207718349202011-09-14T11:01:05.936-04:002011-09-14T11:01:05.936-04:00I had the same problem as Anonymous.
Rob's sol...I had the same problem as Anonymous.<br />Rob's solution did not really work.<br /><br />But this helped:<br /><br />props.setPropertyValue( "CellBackColor", Java::java.lang.Integer.new(16711680))Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-165807313160822069.post-62605400636530203762010-10-23T13:54:50.778-04:002010-10-23T13:54:50.778-04:00When you do:
v = props.getPropertyValue("Cell...When you do:<br />v = props.getPropertyValue("CellBackColor")<br /><br />Do a:<br />puts v.class.to_s<br /><br />That will find out what type you should be passing in. Are you sure it is a long that it is expecting?Rob Brittonhttps://www.blogger.com/profile/06467713562648469830noreply@blogger.comtag:blogger.com,1999:blog-165807313160822069.post-64311860565733188362010-10-23T08:15:49.751-04:002010-10-23T08:15:49.751-04:00Hi, Thanks
still working good on latest Ooo/jruby ...Hi, Thanks<br />still working good on latest Ooo/jruby :)<br />but i have a problem with color<br /><br />range = sheet.getCellRangeByName("B4:D16")<br />props = queryUno(XPropertySet, range)<br />v = props.getPropertyValue('CellBackColor')<br /><br />## it's ok so far, got an Fixnum, but ...<br />props.setPropertyValue("CellBackColor",16711680)<br /># don't work ! i receive an IllegalArgumentException<br /><br />I'm guessing it's related to a Type issue ... (jruby / java / ooo)<br />i've tried things like java.lang.Long[6711680].new or with AnyConverter.toLong with no luck :(<br />Any ideas ?<br />Thanks :)Anonymousnoreply@blogger.com