Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Study notes in excel text mode area

Shulou Source: shulou.com Published: 2022-06-03 04:44:48 11月25日 Update

Study notes in excel text mode area

Import java.io.FileInputStream

Import java.io.InputStream

Import org.apache.poi.hssf.extractor.ExcelExtractor

Import org.apache.poi.hssf.usermodel.HSSFWorkbook

Import org.apache.poi.poifs.filesystem.POIFSFileSystem

/ / text reading

Public class Demo2 {

Public static void main (String [] args) throws Exception {

InputStream is = new FileInputStream ("E:\\ data.xls")

POIFSFileSystem fs = new POIFSFileSystem (is)

HSSFWorkbook wb = new HSSFWorkbook (fs); / / create a new workbook

/ / text reading

ExcelExtractor excelExtractor = new ExcelExtractor (wb)

ExcelExtractor.setIncludeSheetNames (false); / / No shell title is required

System.out.println (excelExtractor.getText ()); / / text reading

}

}

Tags: Text mode notes study title work Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Xiaomi Docker Apple Redmi