1添加maven依赖
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
2读取Excel文件属性自定义列

3代码
import org.apache.poi.hpsf.CustomProperties;
import org.apache.poi.hpsf.DocumentSummaryInformation;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Map;
import java.util.Set;
public static void addExcelPropertys(File file) throws Exception {
InputStream in = new FileInputStream(file);
HSSFWorkbook workbook = new HSSFWorkbook(in);
DocumentSummaryInformation information = workbook.getDocumentSummaryInformation();
CustomProperties properties = information.getCustomProperties();
Set<Map.Entry<String, Object>> entries = properties.entrySet();
for (Map.Entry<String, Object> entry : entries) {
System.out.println(entry.getKey()+"=="+entry.getValue());
}
workbook.close();
}