You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.dsideal.base.Tools.Test;
|
|
|
|
|
|
|
|
import com.dsideal.base.Tools.FillData.ExcelKit.ExcelKit;
|
|
|
|
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
|
|
|
import org.dom4j.DocumentException;
|
|
|
|
import org.xml.sax.SAXException;
|
|
|
|
|
|
|
|
import javax.xml.parsers.ParserConfigurationException;
|
|
|
|
import javax.xml.xpath.XPathExpressionException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class TestOutSideExcel {
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws IOException, InvalidFormatException, InterruptedException, ParserConfigurationException, SAXException, XPathExpressionException, DocumentException {
|
|
|
|
String sourceDoc = "D:\\dsWork\\YunNanDsBase\\Doc\\全省及州市县区人口与教育报告集20241023\\133个县区报告2022\\县区研究报告\\丽江市各县区报告5\\宁蒗县\\宁蒗县人口变化及其对教育的影响.docx";
|
|
|
|
//需要第几个图表
|
|
|
|
for (int chartNumber = 36; chartNumber <= 37; chartNumber++) {
|
|
|
|
System.out.println("正在处理第" + chartNumber + "个图表的信息~");
|
|
|
|
//读取图表
|
|
|
|
List<List<String>> list = ExcelKit.readChart(sourceDoc, chartNumber);
|
|
|
|
ExcelKit.printTable(list);
|
|
|
|
System.out.println("=========================================================");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|