第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Java Apache POI FINE_DOTS 無法解析或不是字段

Java Apache POI FINE_DOTS 無法解析或不是字段

白板的微信 2021-07-05 13:43:31
我正在嘗試使用此示例重現(xiàn)一些示例代碼以生成著色的 .xmlx 單元格:http ://thinktibits.blogspot.com/2012/12/excel-cell-fill-color-java-poi-example.htmlEclipse 給我錯(cuò)誤“FINE_DOTS 無法解析或不是字段”。我不明白為什么它不喜歡這個(gè),因?yàn)槲野l(fā)現(xiàn)了很多涉及“XSSFCellStyle.FINE_DOTS”的例子。    import java.io.*;    import java.sql.*;    import java.text.DateFormat;    import java.text.ParseException;    import java.text.SimpleDateFormat;    import java.util.*;    import org.apache.poi.hssf.usermodel.*;    import org.apache.poi.ss.usermodel.*;    import org.apache.poi.xssf.usermodel.*;    import org.apache.poi.xssf.usermodel.XSSFCellStyle;    public class WriteXLSX {        public WriteXLSX() throws FileNotFoundException, IOException, ParseException {            /* Create Workbook and Worksheet XLSX Format */            XSSFWorkbook my_workbook = new XSSFWorkbook();            XSSFSheet my_sheet = my_workbook.createSheet("Cell Font");            /* Get access to XSSFCellStyle */            XSSFCellStyle my_style = my_workbook.createCellStyle();            /* We will now specify a background cell color */             my_style.setFillPattern(XSSFCellStyle.FINE_DOTS );             my_style.setFillForegroundColor(IndexedColors.BLUE.getIndex());             my_style.setFillBackgroundColor(IndexedColors.RED.getIndex());            /* Create a row in the sheet */            Row row = my_sheet.createRow(0);            /* Create a cell */            Cell cell = row.createCell(0);            cell.setCellValue("Cell Fill Color Test");            /* Attach the style to the cell */            cell.setCellStyle(my_style);            /* Write changes to the workbook */            FileOutputStream out = new FileOutputStream(new File("cell_fill_color.xlsx"));            my_workbook.write(out);            out.close();        }    }
查看完整描述

1 回答

?
ABOUTYOU

TA貢獻(xiàn)1812條經(jīng)驗(yàn) 獲得超5個(gè)贊

使用填充模式類型。

試試這個(gè):

my_style.setFillPattern(FillPatternType.FINE_DOTS );


查看完整回答
反對(duì) 回復(fù) 2021-07-14
  • 1 回答
  • 0 關(guān)注
  • 256 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)