How to read excel file using JXL 2.6.12 jar
<p>When I am adding jxl.jar in my eclipse project, it saw convertion error to dalvik format into the console.</p>

<p>Error display in console:</p>

<p>[2010-08-02 19:11:22 - TestApp] trouble writing output: shouldn't happen</p>

<p>[2010-08-02 19:11:22 - TestApp] Conversion to Dalvik format failed with error 2</p>

<p>Code is ok</p>

<p>Below is my code:</p>

<pre><code>import java.io.File;
import java.io.IOException;

import jxl.Cell;
import jxl.CellType;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;

public class ReadExcel {

    private String inputFile;

    public void setInputFile(String inputFile) {
        this.inputFile = inputFile;
    }

    public void read() throws IOException  {
        File inputWorkbook = new File(inputFile);
        Workbook w;
        try {
            w = Workbook.getWorkbook(inputWorkbook);
            // Get the first sheet
            Sheet sheet = w.getSheet(0);
            // Loop over first 10 column and lines

            for (int j = 0; j &lt; sheet.getColumns(); j++) {
                for (int i = 0; i &lt; sheet.getRows(); i++) {
                    Cell cell = sheet.getCell(j, i);
                    CellType type = cell.getType();
                    if (cell.getType() == CellType.LABEL) {
                        System.out.println("I got a label "
                                + cell.getContents());
                    }

                    if (cell.getType() == CellType.NUMBER) {
                        System.out.println("I got a number "
                                + cell.getContents());
                    }

                }
            }
        } catch (BiffException e) {
            e.printStackTrace();
        }
    }



}
</code></pre>

<p>Is there anyway to solve this problem?</p>

<p>Thanks
Mintu</p>
