摘要:
/// /// DataTable导出到Excel文件/// /// public static bool DataTableToExcel(DataTable dtable){if (dtable != null && dtable.Rows.Count > 0){//设置基本信息HttpResponse resp = HttpContext.Current.Response;try{resp.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");resp.ContentType = 阅读全文
posted @ 2014-01-23 09:21
顿金
阅读(213)
评论(0)
推荐(0)
摘要:
/// /// DataTable行转列/// /// 需要转换的表/// 转换表表头对应旧表字段(小写)/// public static DataTable DataTableRowtoCon(DataTable dtable, string head){DataTable dt = new DataTable();dt.Columns.Add("NumberID");for (int i = 0; i < dtable.Rows.Count; i++){//设置表头dt.Columns.Add(dtable.Rows[i][head].ToString());} 阅读全文
posted @ 2014-01-23 09:12
顿金
阅读(2292)
评论(1)
推荐(0)

浙公网安备 33010602011771号