public class PoiWatermarkUtil
extends java.lang.Object
| 构造器和说明 |
|---|
PoiWatermarkUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
putWaterRemarkToExcel(org.apache.poi.ss.usermodel.Sheet sheet,
java.lang.String waterRemarkPath)
为Excel打上水印工具函数仅支持XLSX格式
|
static void |
putWaterRemarkToExcel(org.apache.poi.ss.usermodel.Sheet sheet,
java.lang.String waterRemarkPath,
java.lang.String position)
为Excel打上水印工具函数仅支持XLSX格式
|
public static void putWaterRemarkToExcel(org.apache.poi.ss.usermodel.Sheet sheet,
java.lang.String waterRemarkPath,
java.lang.String position)
throws java.lang.Exception
sheet - 需要打水印的ExcelwaterRemarkPath - 水印地址,classPath,目前只支持png格式的图片,
因为非png格式的图片打到Excel上后可能会有图片变红的问题,且不容易做出透明效果。
position - 位置 LEFT,CENTER,RIGHTjava.io.IOExceptionjava.lang.Exceptionpublic static void putWaterRemarkToExcel(org.apache.poi.ss.usermodel.Sheet sheet,
java.lang.String waterRemarkPath)
throws java.lang.Exception
sheet - 需要打水印的ExcelwaterRemarkPath - 水印地址,classPath,目前只支持png格式的图片,
因为非png格式的图片打到Excel上后可能会有图片变红的问题,且不容易做出透明效果。
java.io.IOExceptionjava.lang.ExceptionCopyright © 2021 悟耘. All Rights Reserved.