|
|
|
@ -6,6 +6,7 @@ import com.aspose.cells.Worksheet;
|
|
|
|
|
import com.aspose.cells.WorksheetCollection;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
@ -37,8 +38,11 @@ public class ExcelToHtml {
|
|
|
|
|
workbook.save("c:/out/" + cnt + ".html");
|
|
|
|
|
workbook.dispose();
|
|
|
|
|
}
|
|
|
|
|
String filePath = "c:/out/map.json";
|
|
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
mapper.writeValue(new File(filePath), _map);
|
|
|
|
|
String content="";
|
|
|
|
|
for (Integer key : _map.keySet()) {
|
|
|
|
|
String value = _map.get(key);
|
|
|
|
|
content += "<a href='" + key + ".html'>" + value + "</a><br>\r\n";
|
|
|
|
|
}
|
|
|
|
|
FileUtil.writeString(content,"c:/Out/index.html", "UTF-8");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|