// 生成总工会所属公司按税务局分组的报表 private void GroupByTaxAuthority(DateTime time) { ExcelInterface excel = new ExcelInterface(null, 'w'); FillCells(excel.GetWorksheet().Cells, time, "三门峡市总工会", "TaxAuthority"); StyleCells(excel.GetWorksheet().Cells); string filename = Path.Combine(Directory.GetCurrentDirectory(), time.ToString(timeFormat_) + "工会经费征收明细.xls"); excel.Save(filename); excel.Close(); }
// 生成全部公司按工会分组的报表 private void GroupByUnion(DateTime time) { ExcelInterface excel = new ExcelInterface(null, 'w'); GroupByUnionFillCells(excel.GetWorksheet().Cells, time); GroupByUnionStyleCells(excel.GetWorksheet().Cells); string filename = Path.Combine(Directory.GetCurrentDirectory(), time.ToString(timeFormat_) + "各县(市)区总工会经费收解返计算表.xls"); excel.Save(filename); excel.Close(); }
private Excel.Range GetSortedRange(ExcelInterface excel) { Excel.Range range = excel.GetWorksheet().UsedRange; range.Rows[range.Rows.Count].Delete(); // 删除最后的合计行 range.Sort(range.Columns[1], Header: Excel.XlYesNoGuess.xlYes); // 对除标题行外的其他行排序 return(range); }