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/06/06 10:17:18 UTC

Reading a Checkbox

 
Hi all,

I have just the problem to find out if the checkbox is checked or not.
The CheckBox is an embedded OLE object in an Excel File.

HSSFObjectData data = (HSSFObjectData) iter.next();
if(!data.hasDirectoryEntry()){
	String name = data.getOLE2ClassName();
	if(name != null && name.equals("Forms.CheckBox.1")){
		byte[] da = data.getObjectData();
	}					
}

da has always the same value independently if the check box is checked
or not. 
da = [92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 

Do you have a hint? Thanks a lot.

Gazanfer


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Reading a Checkbox

Posted by Nick Burch <ni...@torchbox.com>.
On Fri, 6 Jun 2008, Ercan, Gazanfer (CIO) (EXT) wrote:
> I have just the problem to find out if the checkbox is checked or not. 
> The CheckBox is an embedded OLE object in an Excel File.

I'd suggest creating a simple file, just a few cells, and two checkboxes, 
both unchecked. Save this file, and copy it to two others. Open one, check 
one checkbox and save. Open the other, check both, and save.

Now, use BiffViewer, and possibly POIFSViewer, to spot what changed with 
the checking. If you can't spot anything obvious, upload the three files 
to bugzilla, and hopefully someone else'll take a look

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org