日期:2014-05-20 浏览次数:21062 次
string filename = "预付保费网银" + DateTime.Now.ToString("yyyy_MM_dd_HH_mm_sssss") + ".xls";
XlsDocument xls = new XlsDocument();
xls.FileName = filename;
Worksheet sheet = xls.Workbook.Worksheets.Add("Sheet1");
XF xfdate = xls.NewXF();
xfdate.Format = StandardFormats.Decimal_2;
Cells cells = sheet.Cells;
cells.Add(1, 1, "文件类型"); cells.Add(1, 2, "ExtPayBatch");
cells.Add(2, 1, "标题"); cells.Add(2, 2, "支付转账经办");
string[] titl = { "付款账号", "币种", "本/他行标志", "收款单位编号", "收款人账号", "收款人名称", "支付联行号", "开户网点名称", "开户地所在省/市/自治区", "开户地所在市/县", "支付方式", "支付金额", "预约支付标志", "预约支付日期", "预约支付时间", "摘要", "取票人证件种类", "取票人号码", "取票人姓名", "备注" };
for (int i = 0; i < titl.Length; i++)
{
cells.Add(4, i + 1, titl[i]);
}
string sql = "select fk_zh,sk_zh,sk_name,sk_hh,sk_kh,fee_pay from yfbf_fk where id in (" + ids + ")";
DataTable dt = DBUtility.DbHelperOra.Query(sql).Tables[0];
for (int i = 0; i < dt.Rows.Count; i++)