我想一个接一个地处理多个文件,以便使用tfilelist将它们合并到一个excel文件(Xlsx)中,所以我像屏幕截图一样继续操作,但我得到了以下错误:
For input string: "N_Vol"
For input string: "N_Vol"
Exception in component tFileInputExcel_1
org.apache.poi.openxml4j.exceptions.InvalidOperationException:
Can't open the spec
我正在使用Apache poi 3.8读取xls文件,但是我得到了异常:
java.io.IOException: Unable to read entire header; 0 bytes read; expected 512 bytes
at org.apache.poi.poifs.storage.HeaderBlock.alertShortRead(HeaderBlock.java:226)
at org.apache.poi.poifs.storage.HeaderBlock.readFirst512(HeaderBlock.java:
我正在尝试读取xlsx文件以获取数据表单文件,但我的代码生成的代码如下所示
apache poi不工作或帮助读取xlsx文件
任何人都能知道我需要做些什么来解决这个错误
或其他方式读取java中的xlsx文件。
Exception in thread "main" java.lang.IllegalStateException: Zip File is closed
at org.apache.poi.openxml4j.util.ZipFileZipEntrySource.getEntries(ZipFileZipEntrySource.java:45)
at
在尝试读取.docx文件时,我得到以下异常:
org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data
appears to be in the Office 2007+ XML. You are calling the part of POI
that deals with OLE2 Office Documents. You need to call a different part of POI
to process this data (eg XSSF instead of HSSF)
at
为什么我的Apache代码不读取excel工作表?
我的守则:
public class ReadExcelFile {
public static void main(String[] args) throws IOException {
Workbook book = new XSSFWorkbook(ReadExcelFile.class.getClassLoader().getResourceAsStream("C:\\Users\\Gi\\Desktop\\ExcelReader\\ExcelFramework\\src\\test\\java\\com\\Excel
我正在尝试读取xls和xlsx文件。能够读取xls,但对于xlsx异常:-
java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLEventFactory;
at org.apache.poi.openxml4j.opc.internal.marshallers.PackagePropertiesMarshaller.<clinit>(PackagePropertiesMarshaller.java:45)
at org.apache.poi.openxm
我使用Java Apache POI (hssf)访问Excel电子表格。我得到了以下错误:
java.lang.RuntimeException: org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI
我正在使用POI api读取Excel,我使用以下代码读取excel文件。
public class ExcelWorkBook {
private static ExcelWorkBook excelWorkBook = null;
private static String filePath;
private static XSSFWorkbook workbook;
/**
* This constructor used to initialize the {@link ExcelWorkBo