java poi导出excel合并单元格

文章描述了一个Java程序,使用ApachePOI库创建HSSFWorkbook工作簿,生成包含部门支出预算明细的Excel表格,包括合并单元格和样式设置。

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

导出效果

代码:

import java.math.BigDecimal;

public class CwmonthlyPlanSub0Bean {
	/**
	 * 主键
	 */
	private Long id;
	/**
	 * 付款类
	 */
	private String fkl;
	/**
	 * 付款事项
	 */
	private String fksx;
	
	/**
	 * 本期预算金额
	 */
	private BigDecimal bqysje;
	
	
/**
 * 
 * 电汇金额
 */
	private BigDecimal dhje;
/**
 * 
 
 */
	private BigDecimal cdje;
	private String remarks;
	public CwmonthlyPlanSub0Bean(Long id, String fkl, String fksx, BigDecimal bqysje, BigDecimal dhje,BigDecimal cdje, String remarks) {
		super();
		this.id = id;
		this.fkl = fkl;
		this.fksx = fksx;
		
		this.bqysje = bqysje;
		
		this.dhje=dhje;
		this.cdje=cdje;
		this.remarks=remarks;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the fkl
	 */
	public String getFkl() {
		return fkl;
	}

	/**
	 * @param fkl the fkl to set
	 */
	public void setFkl(String fkl) {
		this.fkl = fkl;
	}

	/**
	 * @return the fksx
	 */
	public String getFksx() {
		return fksx;
	}

	/**
	 * @param fksx the fksx to set
	 */
	public void setFksx(String fksx) {
		this.fksx = fksx;
	}

	

	/**
	 * @return the bqysje
	 */
	public BigDecimal getBqysje() {
		return bqysje;
	}

	/**
	 * @param bqysje the bqysje to set
	 */
	public void setBqysje(BigDecimal bqysje) {
		this.bqysje = bqysje;
	}


	/**
	 * @return the dhje
	 */
	public BigDecimal getDhje() {
		return dhje;
	}

	/**
	 * @param dhje the dhje to set
	 */
	public void setDhje(BigDecimal dhje) {
		this.dhje = dhje;
	}

	/**
	 * @return the cdje
	 */
	public BigDecimal getCdje() {
		return cdje;
	}

	/**
	 * @param cdje the cdje to set
	 */
	public void setCdje(BigDecimal cdje) {
		this.cdje = cdje;
	}

	/**
	 * @return the remarks
	 */
	public String getRemarks() {
		return remarks;
	}

	/**
	 * @param remarks the remarks to set
	 */
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}




	
}
public static void main(String args[]) {
		// 模拟部分数据
		List<CwmonthlyPlanSub0Bean> detail = new ArrayList<CwmonthlyPlanSub0Bean>();
		// MonthlyFundingEntity entity=dao.get
		CwmonthlyPlanSub0Bean d1 = new CwmonthlyPlanSub0Bean(1L, "人工", "工资", new BigDecimal("4.675"),
				new BigDecimal("4.675"), new BigDecimal("4.675"), "555");
		CwmonthlyPlanSub0Bean d2 = new CwmonthlyPlanSub0Bean(2L, "人工", "福利费", new BigDecimal("44.675"),
				new BigDecimal("4.675"), new BigDecimal("4.675"), "66");
		CwmonthlyPlanSub0Bean d3 = new CwmonthlyPl
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值