小编use*_*633的帖子

如何解决JXL错误:jxl.read.biff.BiffException:无法识别OLE流

我试图从我的.csv文件中获取单元格数据,但它收到错误:jxl.read.biff.BiffException:无法识别OLE流

我不明白如何解决这个问题,请给我一些解决方案,这段代码是针对jxl api的,是对.csv的api支持吗?

代码:

public void read() throws IOException, BiffException  {

    File inputWorkbook = new File(inputFile);

    try
    {
        w = Workbook.getWorkbook(inputWorkbook.getAbsoluteFile());
        // Get the first sheet
        Sheet sheet = w.getSheet(0);
        // Loop over first 10 column and lines

        for (row = 1; row < sheet.getRows(); row++) 
        {
            ReadExcelLotSizeEntity readExcelLotSizeEntity =new ReadExcelLotSizeEntity();

                cell = sheet.getCell(1,row);
                type= cell.getType();
                if (cell.getType() == CellType.LABEL)
                {

                    symbol=cell.getContents();
                    System.out.println(":::::::::::::::::"+symbol);
                    readExcelLotSizeEntity.setSymbol(symbol);
                }   

                int col=2;
                cell = sheet.getCell(col,row);
                while(!cell.getContents().equals("")||cell.getContents()!=null)
                {
                    System.out.println("||||||||||||||||"+cell.getContents());
                    cell=sheet.getCell(col,row);
                    col++;
                }
                lotSize= new Double(cell.getContents());
                readExcelLotSizeEntity.setLotSize(lotSize); …
Run Code Online (Sandbox Code Playgroud)

java jexcelapi

17
推荐指数
4
解决办法
8万
查看次数

组件是转发器,不能直接通过ajax重新绘制

我创建了包含2个文本框的列表视图,
我想填写ajaxbutton提交的那些文本框.
但我收到这个错误:

组件com.cerebrum.pages.ShowCalculator $ ShowCalculatorForm $ 2已添加到目标.该组件是转发器,不能直接通过ajax重新绘制.而是在层次结构中更高的位置添加其父级或另一个标记容器.

wicket hibernate

2
推荐指数
1
解决办法
1886
查看次数

当我在第一个下拉选项中选择值时,如何在第二个下拉选项中添加值?

我有两个下拉选项,从第一个下拉选项中选择值后,我需要
从数据库表中选择相关值列表,并将此列表添加到第二个
下拉选项中.这是我的示例代码供参考.
给我任何提示或参考.

 HTML:
 <select wicket:id="DDCStartDate" style=" width : 98px;"></select>
 <select wicket:id="DDCEndDate" style=" width : 98px;">.
Run Code Online (Sandbox Code Playgroud)

Java代码:

  final DropDownChoice DDCStartDate=new DropDownChoice("DDCStartDate",new    
         PropertyModel(collectionReportModel, "DDCStartDate"),lst);
  add(DDCStartDate);
  DDCStartDate.setOutputMarkupId(true);

  final DropDownChoice DDCEndDate=new DropDownChoice("DDCEndDate",);
  add(DDCEndDate);
  DDCEndDate.setOutputMarkupId(true);
Run Code Online (Sandbox Code Playgroud)

POJO代码:

     private Date DDCStartDate;
private Date DDCEndDate;
    public Date getDDCStartDate() 
{
    return DDCStartDate;
}
public void setDDCStartDate(Date dDCStartDate) 
{
    DDCStartDate = dDCStartDate;
}


public Date getDDCEndDate() {
    return DDCEndDate;
}
public void setDDCEndDate(Date dDCEndDate) {
    DDCEndDate = dDCEndDate;
}
Run Code Online (Sandbox Code Playgroud)

java wicket dropdownchoice

1
推荐指数
1
解决办法
1128
查看次数

标签 统计

java ×2

wicket ×2

dropdownchoice ×1

hibernate ×1

jexcelapi ×1