golang產生excel

來源:互聯網
上載者:User

excelclaim

封裝了excelize簡化表格的產生。

使用

  • 產生交通補貼
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")
交通費.jpg
  • 產生加班補貼
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));
餐費.jpg
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.