Golang Generating Excel

Source: Internet
Author: User

Excelclaim

Excelize simplified form generation is packaged.

Use

    • Generate Traffic allowances
sheet := excel.NewSheet(xlsx, "加班交通费", 7, 28)sheet.SetAllColsWidth(7, 14, 10, 11, 12, 8, 8)sheet.SetRowNum(6)excelStyle := excel.NewExcelStyle(11, 0, false);sheet.Apply(excelStyle);excelStyle2 := excel.NewExcelStyle(11, 0, true);sheet.WriteRow("市内交通费报销明细").SetRowHeight(34).Apply(excelStyle2)sheet.WriteRow("月份", "6", "姓名", "wwww", "部门", "", "研发部").Apply(excelStyle2)sheet.WriteRow("序号", "日期", "出发地", "到达地", "公务事由", "金额", "备注").Apply(excelStyle2)sheet.WriteRow("1", "2018.06.07", "公司", "宝安", "加班", "80.00", "").ApplyItem(1, excelStyle2)sheet.WriteRow("2", "2018.06.07", "公司", "宝安", "加班", "80.00", "").ApplyItem(1, excelStyle2)sheet.WriteRow("", "", "", "", "金额合计", "160.00")
Transportation costs. jpg
    • Generate overtime Allowance
sheet := excel.NewSheet(xlsx, "加班餐费", 6, 22)sheet.SetAllColsWidth(7, 14, 8, 11, 8, 12)sheet.WriteRow("加班餐费明细")sheet.WriteRow("月份", "2018年06月", "姓名", "wwww", "部门", "研发部")sheet.WriteRow("序号", "日期", "事由", "中餐/晚餐", "金额", "备注")sheet.WriteRow("1", "2018-06-01", "加班", "晚餐", "20", "21:05")sheet.WriteRow("2", "2018-06-02", "加班", "晚餐", "20", "21:05")sheet.WriteRow("3", "2018-06-01", "加班", "晚餐", "20", "21:05")sheet.WriteRow("4", "2018-06-02", "加班", "晚餐", "20", "21:05")sheet.WriteRow("", "", "", "", "金额合计", "80.00", "")sheet.Apply(excel.NewExcelStyle(10, -1, false));
Meal fee. jpg

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.