本文介绍了如何添加显示总计的新行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在窗口应用程序中存在疑问.如何在excel中的起始位置插入标头,徽标.在excel中填充数据表值后,如何在一个单元格中添加显示总计的新行以及总计amt的总和...
我已经使用RKLib.ExportData创建了excel报告;
doubt in window application.how to insert header,logo in starting position in excel .after filling datatable value in excel,how to add new row showing Grand Total in one cell and sum of Total amt...
i have created excel report using RKLib.ExportData;
string strq="Select query";
DataSet ds1 = obj.GetDataset(strq);
// Get the datatable to export
System.Data.DataTable dtEmployee = ds1.Tables[0].Copy();
//Export all the details to Excel
RKLib.ExportData.Export objExport = new RKLib.ExportData.Export("Win");
int[] iColumns = { 0 };
string[] Headers = {"Total amt"};
string str = ConfigurationSettings.AppSettings["Potkirdpath"];
string filename = "path"
string date = DateTime.Today.Year.ToString() + DateTime.Today.ToString("MM") + DateTime.Today.ToString("dd");
string time = System.DateTime.Now.ToString("ddMMyyyy_hhmmsstt");
if (!Directory.Exists(str))
{
Directory.CreateDirectory(str);
}
string fullPath = str + "\\" + filename + "-" + time.ToString() + ".xls";
objExport.ExportDetails(dtEmployee, iColumns, Headers, Export.ExportFormat.Excel, fullPath);
我的excel报告已创建.我对如何在excel中填充dtemployee有一个疑问,如何在开始位置插入标头,徽标.如何在一个单元格中添加显示Grand Total的新行以及在一个单元格中显示Total amt的总和.
my excel report is created.i have 1 doubt how to insert header,logo in starting position.after filling dtemployee in excel.how to add new row showing Grand Total in one cell and sum of Total amt in one cell.
推荐答案
这篇关于如何添加显示总计的新行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!