|
@@ -15,6 +15,7 @@ import com.mixsmart.utils.FormulaUtils;
|
|
import com.mixsmart.utils.ListUtils;
|
|
import com.mixsmart.utils.ListUtils;
|
|
import com.mixsmart.utils.RegexUtils;
|
|
import com.mixsmart.utils.RegexUtils;
|
|
import com.spire.xls.FileFormat;
|
|
import com.spire.xls.FileFormat;
|
|
|
|
+import com.spire.xls.Worksheet;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
@@ -1606,6 +1607,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
short fontIndex = cell.getCellStyle().getFontIndex();
|
|
short fontIndex = cell.getCellStyle().getFontIndex();
|
|
Font fontAt = workbook.getFontAt(fontIndex);
|
|
Font fontAt = workbook.getFontAt(fontIndex);
|
|
fontAt.setFontName("EUDC");
|
|
fontAt.setFontName("EUDC");
|
|
|
|
+ cell.getCellStyle().setFont(fontAt);
|
|
cell.setCellValue(exceVal.replace("□", "\u2611"));
|
|
cell.setCellValue(exceVal.replace("□", "\u2611"));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -1636,6 +1638,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
short fontIndex = cell.getCellStyle().getFontIndex();
|
|
short fontIndex = cell.getCellStyle().getFontIndex();
|
|
Font fontAt = workbook.getFontAt(fontIndex);
|
|
Font fontAt = workbook.getFontAt(fontIndex);
|
|
fontAt.setFontName("EUDC");
|
|
fontAt.setFontName("EUDC");
|
|
|
|
+ cell.getCellStyle().setFont(fontAt);
|
|
cell.setCellValue(myData);
|
|
cell.setCellValue(myData);
|
|
}
|
|
}
|
|
boolean wrap = Optional.ofNullable(cell).map(Cell::getCellStyle).map(CellStyle::getWrapText).orElse(true);
|
|
boolean wrap = Optional.ofNullable(cell).map(Cell::getCellStyle).map(CellStyle::getWrapText).orElse(true);
|
|
@@ -1689,8 +1692,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
workbook.write(outputStream);
|
|
workbook.write(outputStream);
|
|
|
|
|
|
com.spire.xls.Workbook workbook2 = new com.spire.xls.Workbook();
|
|
com.spire.xls.Workbook workbook2 = new com.spire.xls.Workbook();
|
|
- workbook2.loadFromFile(excelPath);
|
|
|
|
|
|
|
|
|
|
+ workbook2.loadFromFile(excelPath);
|
|
//设置转换后的PDF页面高宽适应工作表的内容大小
|
|
//设置转换后的PDF页面高宽适应工作表的内容大小
|
|
workbook2.getConverterSetting().setSheetFitToPage(true);
|
|
workbook2.getConverterSetting().setSheetFitToPage(true);
|
|
workbook2.saveToFile(pdfPath, FileFormat.PDF);
|
|
workbook2.saveToFile(pdfPath, FileFormat.PDF);
|