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 {
|
|
|
|
|
|
|
|
///c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:tx/c:rich/a:p/a:r/a:t/text()
|
|
|
|
public static void main(String[] args) throws IOException, InvalidFormatException, InterruptedException, ParserConfigurationException, SAXException, XPathExpressionException, DocumentException {
|
|
|
|
String sourceDoc = "c:/双江县人口变化及其对教育的影响的研究报告.docx";
|
|
|
|
//需要第几个图表
|
|
|
|
for (int chartNumber = 36; chartNumber <= 36; chartNumber++) {
|
|
|
|
System.out.println("正在处理第" + chartNumber + "个图表的信息~");
|
|
|
|
//读取图表
|
|
|
|
List<List<String>> list = ExcelKit.getChartData(sourceDoc, chartNumber,0);
|
|
|
|
ExcelKit.printTable(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|