|
@@ -659,11 +659,11 @@ public class ExcelTabController extends BladeController {
|
|
|
|
|
|
|
|
|
|
|
|
-/* public static void main(String[] args) throws FileNotFoundException {
|
|
|
+ /* public static void main(String[] args) throws FileNotFoundException {
|
|
|
|
|
|
String thmlUrl = "/Users/hongchuangyanfa/Desktop/1234567890.html";
|
|
|
|
|
|
- File file1 = ResourceUtil.getFile("/Users/hongchuangyanfa/Downloads/5cadb3f4ed3bb15a14fb770117ca7f2b.xlsx");
|
|
|
+ File file1 = ResourceUtil.getFile("/Users/hongchuangyanfa/Downloads/A16.xlsx");
|
|
|
|
|
|
Workbook wb = new Workbook();
|
|
|
wb.loadFromMHtml(new FileInputStream(file1));
|
|
@@ -1016,7 +1016,7 @@ public class ExcelTabController extends BladeController {
|
|
|
Map<String, String> groupMap2 = colTitle.stream()
|
|
|
.collect(Collectors.groupingBy(ExctabCell::getTextInfo, Collectors.mapping(ExctabCell::getXys, Collectors.joining(","))));
|
|
|
|
|
|
- exctabCellService.DeletExcelByTableId(excelId + "");
|
|
|
+ // exctabCellService.DeletExcelByTableId(excelId + "");
|
|
|
|
|
|
List<ExctabCell> colTitle2 = new ArrayList<>();
|
|
|
for (String title : groupMap2.keySet()) {
|
|
@@ -1027,7 +1027,7 @@ public class ExcelTabController extends BladeController {
|
|
|
exctabCell.setXys(groupMap2.get(title));
|
|
|
colTitle2.add(exctabCell);
|
|
|
}
|
|
|
- exctabCellService.saveBatch(colTitle2);
|
|
|
+ // exctabCellService.saveBatch(colTitle2);
|
|
|
|
|
|
// 保存
|
|
|
File writefile = new File(thmlUrl);
|
|
@@ -1366,8 +1366,8 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
//https:bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20220819/b53cb6700db369381e3b03d7737bcdec.jpg__16_1
|
|
|
if (myData.indexOf("https") >= 0 && myData.indexOf("aliyuncs") >= 0) {
|
|
|
- Element element = trs.get(y1).select("td").get(x1);
|
|
|
- String styles[] = element.attr("style").split(";");
|
|
|
+ // Element element = trs.get(y1).select("td").get(x1);
|
|
|
+ String styles[] = data.attr("style").split(";");
|
|
|
int Height = 0;
|
|
|
for (String sty : styles) {
|
|
|
if (sty.indexOf("height:") >= 0) {
|
|
@@ -1378,6 +1378,8 @@ public class ExcelTabController extends BladeController {
|
|
|
BufferedImage image = ImageIO.read(CommonUtil.getOSSInputStream(myData));
|
|
|
ExcelPicture pic = sheet.getPictures().add(y1, x1, image);
|
|
|
pic.setHeight(Height);
|
|
|
+ System.out.println(sheet.getCellRange(y1, x1).getRowHeight());
|
|
|
+ System.out.println(sheet.getCellRange(y1, x1).getColumnWidth());
|
|
|
sheet.getCellRange(y1, x1).getStyle().setShrinkToFit(true);
|
|
|
|
|
|
} else {
|