You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Ercan, Gazanfer (CIO) (EXT)" <ga...@siemens.com> on 2008/04/09 16:49:58 UTC
HSSFObjectData: how to read the entry of an CheckBox
Hi all,
I have an excel sheet with an OLEObject
Forms.CheckBox.1.
With visual basic I can read it with following code:
For Each SFB In ActiveSheet.OLEObjects
If TypeName(SFB.Object) = "Checkbox" Then
Result = SFB.Object:Value
End If
Next SFB
How can I read the entry.checked of this checkbox?
List objects = wb.getAllEmbeddedObjects();
System.out.println(objects.size()); // object
size is 1
((HSSFObjectData)
objects.get(0)).getDirectory(); // this throws an exception
If I call getDirectory() this throws an exception.
java.io.FileNotFoundException: no such entry: "MBD00000000"
at
org.apache.poi.poifs.filesystem.DirectoryNode.getEntry(DirectoryNode.jav
a:247)
at
org.apache.poi.hssf.usermodel.HSSFObjectData.getDirectory(HSSFObjectData
.java:76)
Dump of the object returns:
[ftPictFmla]
.streamIdOffset = 0x0020 (32 )
.unknown = 0x[264C, 01A0, F802, 2321, 0301, ] (5 )
.unicodeLen = 0x0010 (16 )
.unicodeFlag = 0x0 (false )
.oleClassname = Forms.CheckBox.1
.streamId = 0x00000000 (0 )
[/ftPictFmla]
Thanks.
Gazanfer
RE: HSSFObjectData: how to read the entry of an CheckBox
Posted by "Ercan, Gazanfer (CIO) (EXT)" <ga...@siemens.com>.
Hi Nick,
I opened a new bug on bugzilla -> Bug 44840.
Thanks.
Gazanfer
-----Original Message-----
From: Nick Burch [mailto:nick@torchbox.com]
Sent: Friday, April 11, 2008 1:54 PM
To: POI Users List
Subject: Re: HSSFObjectData: how to read the entry of an CheckBox
On Wed, 9 Apr 2008, Ercan, Gazanfer (CIO) (EXT) wrote:
> If I call getDirectory() this throws an exception.
>
> java.io.FileNotFoundException: no such entry: "MBD00000000"
Your ftPictFmla references the steam with id 0:
.streamId = 0x00000000 (0 )
But no such stream exists in your file, which is going to be a problem.
I've taken a look at EmbeddedObjectRefSubRecord, and I'm not completely
sure it's correct. Any chance you could open a new bug on bugzilla, and
upload the problem file, so we can take a look?
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: HSSFObjectData: how to read the entry of an CheckBox
Posted by Nick Burch <ni...@torchbox.com>.
On Wed, 9 Apr 2008, Ercan, Gazanfer (CIO) (EXT) wrote:
> If I call getDirectory() this throws an exception.
>
> java.io.FileNotFoundException: no such entry: "MBD00000000"
Your ftPictFmla references the steam with id 0:
.streamId = 0x00000000 (0 )
But no such stream exists in your file, which is going to be a problem.
I've taken a look at EmbeddedObjectRefSubRecord, and I'm not completely
sure it's correct. Any chance you could open a new bug on bugzilla, and
upload the problem file, so we can take a look?
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org