|
|
|
@ -26,19 +26,25 @@ public class CountDocxTuBiao {
|
|
|
|
|
//处理这个目录
|
|
|
|
|
if (files != null) {
|
|
|
|
|
for (File file : files) {
|
|
|
|
|
//if(!file.getName().contains("隆阳"))continue;
|
|
|
|
|
//判断file是不是目录,是目录的需要跳过
|
|
|
|
|
if (file.isDirectory()) continue;
|
|
|
|
|
if (!file.getName().endsWith(".docx") || file.getName().startsWith("~"))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
ExcelKit.UnCompress(file.getAbsolutePath());
|
|
|
|
|
for (int chartNumber = 1; ; chartNumber++) {
|
|
|
|
|
int chartNumber;
|
|
|
|
|
for (chartNumber = 1; ; chartNumber++) {
|
|
|
|
|
String xml = DocxUnzipDirectory + "word\\charts\\chart" + chartNumber + ".xml";
|
|
|
|
|
//System.out.println(xml);
|
|
|
|
|
if (!new File(xml).exists()) {
|
|
|
|
|
System.out.println(file.getName() + " 共" + chartNumber + "个图表");
|
|
|
|
|
chartNumber--;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (chartNumber != 37) {
|
|
|
|
|
System.out.println(file.getAbsolutePath() + " 共" + chartNumber + "个图表");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|