Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
250 views
in Technique[技术] by (71.8m points)

java - HSSFWorkbook is imported, XSSFWorkbook is not, why? Apache Poi 5.0.0

SCREENSHOT HSSFWorkbook is imported, XSSFWorkbook is not, why? I make an application with reading .xls and .xlsx files with Apache poi 5.0.0. Here are my imports. Here are my build.gradle. Maybe I need to connect multidex?

question from:https://stackoverflow.com/questions/65860770/hssfworkbook-is-imported-xssfworkbook-is-not-why-apache-poi-5-0-0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You're missing the OOXML schema. Add the following to your build.gradle dependencies (additionally to the already existing org.apache.poi.poi dependency):

implementation: 'org.apache.poi', name: 'poi-ooxml', version: '5.0.0'

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...