1

I have a word document with checkboxes in it, and I want to determine whether these are ticked or not and use these results with java. I have tried using a WordExtractor with Apache POI but it didn't seem to include the result.

If I save the docx in txt format it replaces each checkbox with a corresponding 0 or 1, which is ideal, but I don't know how to do that programmatically.

surfealokesea
  • 4,971
  • 4
  • 28
  • 38

1 Answers1

0

Seems that you are looking for FtCblsSubRecord class (I didn't try it): http://poi.apache.org/apidocs/org/apache/poi/hssf/record/FtCblsSubRecord.html

http://poi.apache.org/apidocs/org/apache/poi/hssf/record/class-use/SubRecord.html

Results of search in google: checkbox site:poi.apache.org

=========================================

By this post seems not to be posible: http://osdir.com/ml/user-poi.apache.org/2010-10/msg00068.html

Other post talking about this: What API can add checkbox to MS Word file using Java?

Insert a checkbox in an Excel sheet using Apache POI

Community
  • 1
  • 1
surfealokesea
  • 4,971
  • 4
  • 28
  • 38
  • The link to *FtCblsSubRecord* is misleading since this only applies to HSSF (aka Excel). For HWPF (Word; binary *.doc) see my answer [here](http://stackoverflow.com/a/34692292/5717099). – morido Jan 20 '16 at 23:20