摘要://背景色、フォント色、枠線より各種XSSFCellStyleの作成して、cellStyleMapに保存する private HashMap createXssfCellStyle() { HashMap cellStyleMap = new HashMap(); XSSFCellStyle xssfCellStyle; Stri...
阅读全文
摘要:public static int[] hexToRgb(String hex) { String colorStr = hex; if (hex.startsWith("#")) { colorStr = hex.substring(1); } if (StringUtils.length(col
阅读全文
摘要:private XSSFRichTextString parseHtmlStrToRichText(String htmlStr) { Document document = parseHtmlStrToDocument(htmlStr); XSSFRichTextString rts = pars
阅读全文
摘要:excel的行索引和列索引都是从0开始,而行号和列号都是从1开始 POI·操作excel基本上都是使用索引 XSSFRow对象的 row.getLastCellNum() 方法返回的是当前行最后有效列的列号而不是列索引 XSSFSheet对象的 sheet.getLastRowNum() 方法返回的
阅读全文