|
@@ -415,30 +415,30 @@ public class FileUtils {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static void main(String[] args) throws Exception {
|
|
|
- String excelUrl = "/Users/hongchuangyanfa/Downloads/D10.1表-隧道总体质量检验单 (1).xlsx";
|
|
|
- String old_html = "/Users/hongchuangyanfa/Desktop/pdf/old_html.html";
|
|
|
- String old_xlsx = "/Users/hongchuangyanfa/Desktop/pdf/old_html.xlsx";
|
|
|
-
|
|
|
- // excelInfo2(excelUrl,old_xlsx,old_html);
|
|
|
- com.spire.xls.Workbook wb = new com.spire.xls.Workbook();
|
|
|
- wb.loadFromMHtml(old_xlsx);
|
|
|
- Worksheet sheet = wb.getWorksheets().get(0);
|
|
|
- CellRange[] cells = sheet.getCells();
|
|
|
- for (int i = 0; i < cells.length; i++) {
|
|
|
- CellRange oldcell = cells[i];
|
|
|
- CellRange mergedCell = sheet.getCellRange(oldcell.getRow(), oldcell.getColumn());
|
|
|
- String data = mergedCell.getDataValidation().getErrorMessage();
|
|
|
- System.out.println(oldcell.getRow()+"--=--"+oldcell.getColumn()+"--=--"+data);
|
|
|
- }
|
|
|
-
|
|
|
-/* String new_html = "/Users/hongchuangyanfa/Desktop/pdf/new_html.html";
|
|
|
- String new_xlsx = "/Users/hongchuangyanfa/Desktop/pdf/new_html.xlsx";
|
|
|
-
|
|
|
- File data = new File(old_xlsx);
|
|
|
- InputStream inputStream = new FileInputStream(data);
|
|
|
- excelInfo(inputStream,new_xlsx,new_html,"2");*/
|
|
|
- }
|
|
|
+// public static void main(String[] args) throws Exception {
|
|
|
+// String excelUrl = "/Users/hongchuangyanfa/Downloads/D10.1表-隧道总体质量检验单 (1).xlsx";
|
|
|
+// String old_html = "/Users/hongchuangyanfa/Desktop/pdf/old_html.html";
|
|
|
+// String old_xlsx = "/Users/hongchuangyanfa/Desktop/pdf/old_html.xlsx";
|
|
|
+//
|
|
|
+// // excelInfo2(excelUrl,old_xlsx,old_html);
|
|
|
+// com.spire.xls.Workbook wb = new com.spire.xls.Workbook();
|
|
|
+// wb.loadFromMHtml(old_xlsx);
|
|
|
+// Worksheet sheet = wb.getWorksheets().get(0);
|
|
|
+// CellRange[] cells = sheet.getCells();
|
|
|
+// for (int i = 0; i < cells.length; i++) {
|
|
|
+// CellRange oldcell = cells[i];
|
|
|
+// CellRange mergedCell = sheet.getCellRange(oldcell.getRow(), oldcell.getColumn());
|
|
|
+// String data = mergedCell.getDataValidation().getErrorMessage();
|
|
|
+// System.out.println(oldcell.getRow()+"--=--"+oldcell.getColumn()+"--=--"+data);
|
|
|
+// }
|
|
|
+//
|
|
|
+///* String new_html = "/Users/hongchuangyanfa/Desktop/pdf/new_html.html";
|
|
|
+// String new_xlsx = "/Users/hongchuangyanfa/Desktop/pdf/new_html.xlsx";
|
|
|
+//
|
|
|
+// File data = new File(old_xlsx);
|
|
|
+// InputStream inputStream = new FileInputStream(data);
|
|
|
+// excelInfo(inputStream,new_xlsx,new_html,"2");*/
|
|
|
+// }
|
|
|
|
|
|
|
|
|
/**
|