Read the value of checkboxes from word document programatically with java using POI APIs
<p>I am using POI APIs to read the contents of a word document which has checkboxes and dropdowns in it for data entry.
Below is the code I am using :</p>

<pre><code> package com.mycom.addbutton.handlers;

    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;

    import org.apache.poi.hwpf.HWPFDocument;
    import org.apache.poi.hwpf.usermodel.Paragraph;
    import org.apache.poi.hwpf.usermodel.Range;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;

    import org.apache.poi.hwpf.usermodel.*; 



    String fileName = "C:/Users/Apit/Desktop/xyz.doc";
        InputStream fis;
        try {
        fis = new FileInputStream(fileName);
    POIFSFileSystem fs = new POIFSFileSystem(fis);
    HWPFDocument doc = new HWPFDocument(fs);

    Range range = doc.getRange();

    for (int i=0; i&lt;range.numParagraphs(); i++) {
    Paragraph par = range.getParagraph(i);
    System.out.println("paragraph "+(i+1));
    System.out.println("is in table: "+par.isInTable());
    System.out.println("is table row end: "+par.isTableRowEnd());
    System.out.println(par.text());
    par.

    }

    Paragraph tablePar = range.getParagraph(0);
    if (tablePar.isInTable()) {
    Table table = range.getTable(tablePar);
    for (int rowIdx=0; rowIdx&gt;&lt;table.numRows(); rowIdx++) {
    TableRow row = table.getRow(rowIdx);
    System.out.println("row "+(rowIdx+1)+", is table header: "+row.isTableHeader());
    for (int colIdx=0; colIdx&gt;&lt;row.numCells(); colIdx++) {
    TableCell cell = row.getCell(colIdx);
    System.out.println("column "+(colIdx+1)+", text="+cell.getParagraph(0).text());


    }
</code></pre>

<p>Following is the output :</p>

<pre><code>WARN : 17:57:11,307 - TcLogger$IC_PrintStream.log:?
PART C: CHANGE CATEGORY / TO BE FULFILLED BY PROJECT LEAD ENGINEER

WARN : 17:57:11,374 - TcLogger$IC_PrintStream.log:?
 FORMTEXT ?? /  FORMDROPDOWN  /  FORMDROPDOWN 

WARN : 17:57:11,316 - TcLogger$IC_PrintStream.log:?
 FORMCHECKBOX  Experimental Change
</code></pre>

<p>Can anyone please help as how to use the POI APIs further to actually find out whether the user has checked the checkbox or not ,also to know the dropdown value selected ?</p>
