public class Excel2PdfUtils extends Object
| 构造器和说明 |
|---|
Excel2PdfUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addBorderByExcel(org.apache.poi.ss.usermodel.Workbook wb,
com.itextpdf.text.pdf.PdfPCell cell,
org.apache.poi.ss.usermodel.CellStyle style) |
static void |
addImageByPOICell(org.apache.poi.ss.usermodel.Sheet sheet,
com.itextpdf.text.pdf.PdfPCell pdfpCell,
org.apache.poi.ss.usermodel.Cell cell) |
static int |
getBorderRBG(org.apache.poi.ss.usermodel.Workbook wb,
short index)
获取边框的颜色
|
static String |
getCellString(org.apache.poi.ss.usermodel.Cell cell) |
static org.apache.poi.ss.util.CellRangeAddress |
getColspanRowspanByExcel(org.apache.poi.ss.usermodel.Sheet sheet,
int rowIndex,
int colIndex) |
static com.itextpdf.text.Font |
getFontByExcel(org.apache.poi.ss.usermodel.Workbook wb,
org.apache.poi.ss.usermodel.CellStyle style) |
static int |
getHAlignByExcel(org.apache.poi.ss.usermodel.HorizontalAlignment align) |
static com.itextpdf.text.Phrase |
getPhrase(org.apache.poi.ss.usermodel.Workbook wb,
org.apache.poi.ss.usermodel.Cell cell,
boolean hasAnchor,
int sheetIndex) |
static float |
getPixelHeight(float poiHeight) |
static int |
getPOIColumnWidth(org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Cell cell) |
static int |
getRGB(org.apache.poi.ss.usermodel.Color color) |
static int |
getVAlignByExcel(org.apache.poi.ss.usermodel.VerticalAlignment align) |
static void |
toCreateContentIndexes(com.itextpdf.text.Document document,
int sheetSize) |
static com.itextpdf.text.pdf.PdfPTable |
toParseContent(org.apache.poi.ss.usermodel.Workbook wb,
org.apache.poi.ss.usermodel.Sheet sheet,
int sheetIndex) |
public static int getRGB(org.apache.poi.ss.usermodel.Color color)
public static int getBorderRBG(org.apache.poi.ss.usermodel.Workbook wb,
short index)
wb - 文档对象index - 颜色版索引public static org.apache.poi.ss.util.CellRangeAddress getColspanRowspanByExcel(org.apache.poi.ss.usermodel.Sheet sheet,
int rowIndex,
int colIndex)
public static int getPOIColumnWidth(org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Cell cell)
public static String getCellString(org.apache.poi.ss.usermodel.Cell cell)
public static com.itextpdf.text.Phrase getPhrase(org.apache.poi.ss.usermodel.Workbook wb,
org.apache.poi.ss.usermodel.Cell cell,
boolean hasAnchor,
int sheetIndex)
public static com.itextpdf.text.pdf.PdfPTable toParseContent(org.apache.poi.ss.usermodel.Workbook wb,
org.apache.poi.ss.usermodel.Sheet sheet,
int sheetIndex)
throws com.itextpdf.text.BadElementException,
IOException
com.itextpdf.text.BadElementExceptionIOExceptionpublic static void toCreateContentIndexes(com.itextpdf.text.Document document,
int sheetSize)
throws com.itextpdf.text.DocumentException
com.itextpdf.text.DocumentExceptionpublic static float getPixelHeight(float poiHeight)
public static void addImageByPOICell(org.apache.poi.ss.usermodel.Sheet sheet,
com.itextpdf.text.pdf.PdfPCell pdfpCell,
org.apache.poi.ss.usermodel.Cell cell)
throws com.itextpdf.text.BadElementException,
IOException
com.itextpdf.text.BadElementExceptionIOExceptionpublic static int getVAlignByExcel(org.apache.poi.ss.usermodel.VerticalAlignment align)
public static int getHAlignByExcel(org.apache.poi.ss.usermodel.HorizontalAlignment align)
public static com.itextpdf.text.Font getFontByExcel(org.apache.poi.ss.usermodel.Workbook wb,
org.apache.poi.ss.usermodel.CellStyle style)
public static void addBorderByExcel(org.apache.poi.ss.usermodel.Workbook wb,
com.itextpdf.text.pdf.PdfPCell cell,
org.apache.poi.ss.usermodel.CellStyle style)
Copyright © 2025 姹熻嫃鍗楀ぇ鍏堣吘淇℃伅浜т笟鑲′唤鏈夐檺鍏徃. All rights reserved.