package com.foxconn.Excel.service;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFDataFormat;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.stereotype.Service;
@Service
public class ExportService {
public String createExcel03() {
String filePath = "测试中文及繁體字.xls";
File file = new File(filePath);
if (!file.exists()) {
try {
file.createNewFile();
FileOutputStream fileOutputStream = new FileOutputStream(filePath);
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
HSSFCellStyle cs = wb.createCellStyle();
HSSFCellStyle cs2 = wb.createCellStyle();
HSSFCellStyle cs3 = wb.createCellStyle();
HSSFFont f = wb.createFont();
HSSFFont f2
Excel03版本加密(.xls)
最新推荐文章于 2023-08-15 14:55:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)