HSSFClientAnchor 说明

本文深入解析了HSSFClientAnchor类的构造方法,阐述了如何使用dx1、dy1、dx2、dy2、col1、row1、col2、row2参数创建并设置锚点的坐标。详细介绍了参数含义,同时提供了添加图片到Excel工作表的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

  1. public HSSFClientAnchor(int dx1,int dy1,int dx2,int dy2,short col1,int row1,short col2,
  2. int row2);Creates a new client anchor and sets the top-left and bottom-right coordinates of the anchor.
  3. Parameters:
  4. dx1 - the x coordinate within the first cell.
  5. dy1 - the y coordinate within the first cell.
  6. dx2 - the x coordinate within the second cell.
  7. dy2 - the y coordinate within the second cell.
dx2:第二个单元格的开始X坐标
dy2:第二个单元格的开始y坐标
 
  1. col1 - the column (0 based); of the first cell.
  2. row1 - the row (0 based); of the first cell.
  3. col2 - the column (0 based); of the second cell.
  4. row2 - the row (0 based); of the second cell.
  5. col1 图片的左上角放在第几个列cell, 
    row1 图片的左上角放在第几个行cell, 

    col2 图片的右下角放在第几个列cell, 
    row2 图片的右下角放在第几个行cell,
  6. 列宽 
    sheet.setColumnWidth((short)column,(short)width); 
    行高 
    row.setHeight((short)height);
  7. 添加多个图片时:多个pic应该share同一个DrawingPatriarch在同一个sheet里面。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值