jxl添加水印 修改编译版 经过测试 public class testJxl { public static void main(String[] args) throws Exception { OutputStream out = new FileOutputStream("./aaaa.xls"); // 写入到FileInputStream WritableWorkbook wwb= Workbook.createWorkbook(out); WritableSheet ws1=wwb.createSheet("test1", 0) ; // 得到工作薄中的第一个工作表 File fileImg = new File("./kkkk.bmp"); byte imageData[] = new byte[(int)fileImg.length()]; FileInputStream fis = new FileInputStream(fileImg); fis.read(imageData); // must be 24 bit true-colour,bmp file // * @param imageByte // * @param widthPixel // * @param heightPixel ws1.setWaterMarkImage(imageData,459,142); wwb.write(); wwb.close(); fis.close(); out.close();
2021-05-16 17:36:29 754KB jxl添加水印 修改编译版 经过测试
1
使用例子 public class testJxl { public static void main(String[] args) throws Exception { OutputStream out = new FileOutputStream("./aaaa.xls"); // 写入到 FileInputStream WritableWorkbook wwb= Workbook.createWorkbook(out); WritableSheet ws1=wwb.createSheet("test1", 0) ; // 得到工作薄中的第一个工作表 File fileImg = new File("./kkkk.bmp"); byte imageData[] = new byte[(int)fileImg.length()]; FileInputStream fis = new FileInputStream(fileImg); fis.read(imageData); // must be 24 bit true-colour,bmp file // * @param imageByte // * @param widthPixel // * @param heightPixel ws1.setWaterMarkImage(imageData,459,142); wwb.write(); wwb.close(); fis.close(); out.close(); } }
2019-12-21 22:24:49 754KB jxl excel 加水印
1