总结一下很久之前做的报表小程序,今日有问题又调试了一下。

DB中存在一个表,记录了ID<自增长>,SqlStatement<sql查询语句>及其他必要字段,比如SheetName,ReferenceTable,InertDate等等

任务是循环表记录,针对SqlStatement语句查询结果,对应dataTable,如有数据则以一个sheet显示出来,如果没有数据则略过。

以下是循环生成sheet的代码:

public static void Create(ref Workbook xBook, ref Application xApp, out string ReportDate)
{
Hashtable hash = new Hashtable();
IT_Check_ReportMgr reportMgr = new IT_Check_ReportMgr();
System.Data.DataTable ItCheckEecel = new System.Data.DataTable();//为了避免不明确引用 Worksheet ws; int idcount;
reportMgr.Get_ITCheckID_Data(out idcount);
DataSet ds = new DataSet();
ds = reportMgr.Get_ITCheck_Data(); string strReportDate = reportMgr.GetFlieGenerateDate();
ReportDate = strReportDate; string key = string.Empty;
for (int i = ; i < ds.Tables.Count;i++ )
{
key = "dt" + i.ToString();
if (ds.Tables[i].Rows.Count==)
continue;//如果DT没有数据,则终止当前,开始新的循环
hash.Add(key, ds.Tables[i]); ws = (Worksheet)xBook.Sheets[xBook.Sheets.Count]; //获取sheet名
if (reportMgr.GetSheetName(i).Length >= )
{
ws.Name = reportMgr.GetSheetName(i).Substring(, );
}
else
{
ws.Name = reportMgr.GetSheetName(i);
} IT_Check_Report_Sheet sheetNew = new IT_Check_Report_Sheet(ref ws);
sheetNew.Generate(hash, ws.Name, i); if ( i+==ds.Tables.Count)
continue;
xBook.Sheets.Add(Type.Missing, xBook.Sheets[xBook.Sheets.Count], Type.Missing, Type.Missing); }
hash.Clear(); ////删除无用的sheet
//xApp.DisplayAlerts = false; //如果想删除某个sheet页,首先要将此项设为fasle,最开始生成excel因工作薄内至少含有一张可视工作表,开始时不可删除
//for (int i = 1; i < xApp.Worksheets.Count; i++)
//{
// if (((Worksheet)xApp.Worksheets[i]).Name.IndexOf("Sheet")> -1)//sheetName中是否包含带有sheet名的工作表
// {
// (xApp.ActiveWorkbook.Sheets[i] as Worksheet).Delete();
// }
//}
//xApp.DisplayAlerts = false; //把Sheet定位到第一个
Worksheet wsh = (Worksheet)xBook.Sheets[];
wsh.Activate(); }

调试监视:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAs0AAACWCAIAAACq+yLLAAAMUElEQVR4nO3dvY7bxgKGYZUuU27h8tzIqvN2Ka0uMFKdKnCV1tg6FxC4TXMuIYD2EpLOZVKk2DLFFix9CjkEo/nhiBqSI/p58cKYHfFnKJPDTyOK3H1uld9+/6MDAAC3zG7tOJFEzgAA4NbZ/fb7H8269psDAACuoumcQZIkb1o5gyRJzqWcQZIk51LOIEmScylnkCTJuZQzSJLkXMoZJElyLuUMkiQ5l7vdj7+RJEnO4votIEmSW3X9FpAkya26fgtIkuRW/fz586nUF3rDGpIkyQvM5Ixh5dlD29dvN0mSbN9okoj+2c8zmjMEEZIkufvxn5yRSQbDCUYn3v0TUEZXfPjfH8rKysrKysobLw9jQeYSjfKcUTIBSZL8KjzLBOGfl45nlEzQ20raUlZWVlZWVp6j3FeFnl2rsTOeQZIkL/JzwOmFs0hRPWesn7CUlZWVlZWV5y5H80Rv+DOTkgxhPIMkSe5+DH5vcn3OcI8NkiT5xcKckfo+hSRJMml4fcboGIbhCpIkWeT6LSBJklt1/RaQJMmtun4LSJLkVl2/BSRJcqs+//XcAQBuHJ052kTOAIAtoDNHm4zkjLvXd/n5+wlGpwQAzEeqMx92zjpqLM/EnHH3+u7k6JQAgAXI54y+0x66bAPxlZLLGaP75VnOsPsCwFpEO/NMpw0sQzJnRHfH1C5rVwaAdcnnDIMZWIt4zujH2cLKvhzur9G5AAALEHbmYf88fGmhZuGrp+j6jFT4teMCQCMYz0CbjOeMkktBw38BAEsymjOi9cDc5K7PSDmc4KzQv7RI4wEAXzCegTaJ5IwwN5y92gVDF3IGAKyL8Qy0ycjvWvOVqXhhDwaAhTGegTa5+P4ZmXtz2XEBYC2MZ6BNKoxn9GU7LgCsRf4mBfkPjcB8eI4aAGwBnTnaRM4AgC2gM0eb7J7/eiZJkpzD3dpBBwAAbBY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TOAIBNoDNHk/wf4wYB/pKoiCUAAAAASUVORK5CYII=" alt="" />

以下是generate方法,调用的fill方法<带excel-sheet表头>:

        public bool Generate(Hashtable  hash,string SheetName,int i)
{ System.Data.DataTable dt1 = (System.Data.DataTable)hash["dt"+i.ToString()];
sheet.Name = SheetName;
sheet.Tab.Color = 0xFFFF; if (dt1.Rows.Count == )
{ return false; } Fill(dt1, startRowIndex, startColIndex, true); //设置列标题栏位
IT_Check_TitleStyle(dt1, sheet, dt1.Rows.Count); //增加筛选功能
IT_Check_HeaderFileter(dt1,sheet); return true;
} protected void Fill(System.Data.DataTable dt, int rowStart, int colStart, bool isFormat)
{
int p = ;
for (int beginIndex = ; beginIndex < dt.Rows.Count; beginIndex += p)
{
int endIndex = dt.Rows.Count - ;
if (beginIndex + p < dt.Rows.Count)
{
endIndex = beginIndex + p - ;
} //dt先填充到二维数组中,再添加到range对象效率会高,用时变少
//填充sheet的列名
object[,] arr = new object[endIndex - beginIndex + , dt.Columns.Count]; for (int i = ; i < dt.Columns.Count;i++ )
{
arr[,i]=dt.Columns[i].ColumnName;
} for (int i = beginIndex; i <= endIndex; i++)
{
for (int j = ; j < dt.Columns.Count; j++)
{
arr[i - beginIndex +, j] = dt.Rows[i][j].ToString().Replace("=", "");
}
}
Range range = sheet.get_Range(sheet.Cells[rowStart + beginIndex + , colStart + ], sheet.Cells[rowStart + endIndex + , colStart + dt.Columns.Count]);
range.Rows.NumberFormat = "@";//在填充之前先设置整个range是text类型
if (isFormat)
{ // range.NumberFormat = "#,##0.00"; }
range.Value2 = arr;//二维数组填充到range
range.Borders.LineStyle = XlLineStyle.xlContinuous;
range.Columns.EntireColumn.AutoFit();//设置列宽自动适应 }
}

另:回顾一下Break/Continue的用法:

循环的定义是程序段执行完了以后,再次判断条件,若条件为真,则继续执行该程序段。而在switch结构当中,只是该程序段执行完了之后,就继续执行下面的语句。因此很明显switch结构不是循环。循环有重复、反复执行的功能。

break是跳出整个循环,而continue是结束本次循环!进入下一次循环!
break是不是只针对 for、while、switch 起作用,break的用处可以有两个:
第一:用在switch结构当中的case语句的后面,作用是不再执行后面的case语句,结束switch结构。<选择,退出分支,是条件控制语句,可以用ifelse代替>
第二:用在循环当中,作用是终止该循环的执行,继续执行程序中循环下面的语句。如果有嵌套,只能跳出一层。<结束循环,即跳出与当前该语句最近的循环>如:for循环内if判断语句为真break,则会跳出for循环

例:遍历dr in DataTable,向DB逐条insert语句插入数据,对每dr进行条件筛选,如不符合,则添加errorMsg发送邮件,并结束本次循环,开始下一条dr:

        private void POS_3C_Sale_DSG(string strExrName, string strPathFileName, string strFileName, string FileName, string DataRange, string strCountryCode)
{
var dt = ReadExcelToTable(strPathFileName);
//dt.Rows.RemoveAt(0);
SqlConnection con = new SqlConnection(Connstr);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
con.Open();
int num = , num1 = ;
string strHead = "insert into POS3C_Sale(DataRange,SaleDate,C3AcerRegionTemp,C3ProvinceTemp,C3CityTemp,C3Code,DataType,C3BigAreaCode,C3BigAreaName,C3BranchCode,C3BranchName,C3StoreCode,C3StoreName,C3ProductCode,C3AcerProductCode,C3ProductName,C3BiProductName,C3Brand,C3ProductType1,C3ProductType2,C3ProductType2Name,C3CustomerCode,C3CustomerName,C3ChannelType,C3ChannelName,SaleQty,C3BuyType,C3BuyOrganize,C3ShipAddr,C3SellType,C3OtherInfo1,C3OtherInfo2,C3OtherInfo3,C3OtherInfo4,C3OtherInfo5,C3AcerStoreCode,C3AcerStoreName,DataSource,InsertDate) values ",
strError = ""; Dictionary<DataRow, string> ExcelList = new Dictionary<DataRow, string>();
foreach (DataRow dr in dt.Rows)
{
num1++;
try
{
string DataRang = DataRange;
string SaleDate = dr[].ToString();
DateTime date;
string C3AcerRegionTemp=dr[].ToString();
string C3ProvinceTemp=dr[].ToString();
string C3CityTemp = dr[].ToString();
//C3Code-->strCountryCode
string DataType = (DataRange.IndexOf("w")>-?"Weekly":"Monthly");
string C3BigAreaCode = "";
string C3BigAreaName = "";
string C3BranchCode = "";
string C3BranchName = "";
string C3StoreCode = "";//门店代码
string C3StoreName = "";//门店名称
string C3ProductCode = "";
string C3AcerProductCode = dr[].ToString();
string C3ProductName = "";
string C3BiProductName = "";
string C3Brand = "";
string C3ProductType1 = "";
string C3ProductType2 = "";
string C3ProductType2Name = "";
string C3CustomerCode = "";
string C3CustomerName = "";
string C3ChannelType = "";
string C3ChannelName = "";
int SaleQty = dr[].ToString() == "" ? : Convert.ToInt32(dr[]);
string C3BuyType="";
string C3BuyOrganize="";
string C3ShipAddr="";
string C3SellType="";
string C3OtherInfo1="";
string C3OtherInfo2="";
string C3OtherInfo3 = "";
string C3OtherInfo4 = "";
string C3OtherInfo5 = "";
string C3AcerStoreCode = dr[].ToString();
string C3AcerStoreName = dr[].ToString();
string DataSource = strFileName;
//string InserData=DateTime.Now.ToString(); if (SaleDate == "" || C3AcerProductCode == "")//|| C3AcerStoreCode == "" || C3AcerStoreName == ""
{
strError += "数据问题\r\n\n";
num++;
var Collect = SaleDate == "" ? "销售日期 " : "";
Collect += C3AcerProductCode == "" ? "料号信息 " : "";
//Collect += C3AcerStoreCode == "" ? "32门店代码 " : "";
//Collect += C3AcerStoreName == "" ? "32门店名称 " : "";
ExcelList.Add(dr, Collect + "为空");
continue;
}
if (!DateTime.TryParse(SaleDate.ToString(), out date))
{
SaleDate = "1990-1-1";
}
else
{
SaleDate = date.ToString("yyyy-MM-dd");
}
string strTail = "('" + DataRange + "','"+ SaleDate + "','" + C3AcerRegionTemp + "','" + C3ProvinceTemp + "','" + C3CityTemp + "','" + strCountryCode + "','" +
DataType + "','" + C3BigAreaCode + "','" + C3BigAreaName + "','" + C3BranchCode + "','" + C3BranchName + "','" + C3StoreCode + "','" + C3StoreName + "','" + C3ProductCode + "','" + C3AcerProductCode + "','" + C3ProductName + "','" + C3BiProductName + "','"
+ C3Brand + "','" + C3ProductType1 + "','" + C3ProductType2 + "','" + C3ProductType2Name + "','" + C3CustomerCode + "','" + C3CustomerName + "','" + C3ChannelType + "','"
+ C3ChannelName + "'," + SaleQty + ",'" + C3BuyType + "','" + C3BuyOrganize + "','" + C3ShipAddr + "','" + C3SellType + "','" + C3OtherInfo1 + "','" + C3OtherInfo2 + "','" + C3OtherInfo3 + "','" + C3OtherInfo4 + "','" + C3OtherInfo5 + "','"
+ C3AcerStoreCode + "','" + C3AcerStoreName + "','" + DataSource + "',"+ "getdate())";
cmd.CommandText = strHead + strTail;
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
strError += ex.Message + "\r\n\n";
num++;
ExcelList.Add(dr, ex.Message);
} }
con.Close();
Helper.AutomaticExcle(sErrorDirectory + FileName, @"销售日期,专区,省份,城市,销售门店,32门店代码,32门店名称,编码,料号,描述,数量", ExcelList, "POS3C_Sale");
var CurrentTime = DateTime.Now.ToString("yyyy-MM-dd");
Helper.SavaPOS_3CLog("\r\n\n" + strFileName + "\r\n\n" + "成功:" + (num1-num) + "条,失败" + num + "条。", POS3CLog);
Helper.SavaPOS_3CLog(strFileName + "\r\n\n" + strError, SaleLog);
if (num == )
{
var ErrorContents = strFileName + "。excel中一共有" + num1 + "行数据,成功导入数据:" + num1 + "行。";
Mail.SendMail("(" + strCountryCode + ")POS3C Sale信息导入成功" + CurrentTime, "", ErrorContents);
}
else
{
sMoveDirectory = sErrorDirectory;
strError = strFileName + "\t\t错误信息!";
var ErrorContents = strFileName + "。 excel中一共有" + num1 + "行数据, 实际成功导入:" + (num1 - num) + "行。\r\n\n执行失败:" + num + "行。详细信息请看附件";
Mail.SendMail("(" + strCountryCode + ")POS3C Sale错误信息" + CurrentTime, sErrorDirectory + FileName, ErrorContents);
}
//移动到的路径
string SubdirectoryPath = sMoveDirectory + "\\" + DateTime.Now.ToString("yyyy-MM") + "\\";
if (!System.IO.Directory.Exists(SubdirectoryPath))
{
System.IO.Directory.CreateDirectory(SubdirectoryPath);
}
//使用复制为了覆盖文件夹下已有的该文件
File.Move(strPathFileName, SubdirectoryPath + "\\" + strFileName);
}

excel报表开发-- 根据datatable个数自动生成新sheet的更多相关文章

  1. 使用C#和Excel进行报表开发(三)-生成统计图(Chart)

    有的Web项目选用Excel作为报表方案,在服务器端生成Excel文件,然后传送到客户端,由客户端进行打印.在国内的环境下,相对PDF方式,Excel的安装率应该比pdf阅读器的安装率要高,同时,微软 ...

  2. Excel报表开发(本节主要讲述导出到Excel操作)

    一.Excel导入到GridView以及数据库操作比较简单,这儿不做过多讲解,需要注意的有二点: 1.设置IMEX=1将强制混合数据转换为文本. 2.解决Excel驱动程序默认读取8行:将" ...

  3. Excel报表开发

    读取Excel数据 /// <summary> /// 封装方法 /// </summary> /// <param name="path">& ...

  4. Excel报表开发(主要讲Excel的导入和导出)

    一.Excel数据导入 连接字符串Excel2003版: OleDbConnection conn = new OleDbConnection("provider=Microsoft.Jet ...

  5. vue 辅助开发工具(利用node自动生成相关文件,自动注册路由)

    vue 辅助开发工具 前言 有没有因为新建view,component,store的繁琐操作而苦恼,需要新建文件件,新建vue文件,新建js文件,注册路由...等一系列无价值操作浪费时间,为了解决这个 ...

  6. 转载:C#保存文件时重名自动生成新文件的方法

    /// <summary> /// Generates a new path for duplicate filenames. /// </summary> /// <p ...

  7. mysql使用存储过程,自动生成新的表单

    use mydb; delimiter // CREATE procedure create_table(In imax int) BEGIN DECLARE `@i` int(11);      D ...

  8. jmeter 计数器 (可自动生成新数字、注册专用)

    1.打开jmeter,创建好线程组后,添加计数器 2.设置计数器 3.添加HTTP请求,验证所设置的计数器 4.填写对应参数 5.添加查看结果树,查看结果 6.修改一下线程属性 7.跑一下,看下结果就 ...

  9. Java代码自动生成,生成前端vue+后端controller、service、dao代码,根据表名自动生成增删改查功能

    本项目地址:https://github.com/OceanBBBBbb/ocean-code-generator 项目简介 ocean-code-generator采用(适用):     ,并使用m ...

随机推荐

  1. flume本地调试

    本机idea远程调试flume:https://blog.csdn.net/u012373815/article/details/60601118 遇到 [root@hadoop02 bin]# ./ ...

  2. asp.net处理请求

    当用户通过客户端浏览器向Web服务器发出请求时,Web服务器检查所请求页的扩展名, 如果是aspx,就会启动ASP.NET引擎处理该请求.ASP.NET引擎首先会检查输出缓冲中, 是否有此页面或此页面 ...

  3. DELPHI美化界面(2009开始TPanel增加了ParentBackGround)

    1.透明问题. 要重新调整界面确实很麻烦,以前用DELPHI开发的界面都很土,和WEB真是没办法比.(我以前用的是DELPHI7),现在回想起来,DELPHI难做的原因是:没有透明控件.所有控件都是不 ...

  4. LINQ学习笔记(二)

    上一篇是根据百度百科写的随便,同时也纠正我对LINQ的看法,因为首次接触LINQ是使用EF对数据库数据的操作. 所以误以为它操作数据库的一种新手段. LINQ语言集成查询是一组技术的名称,这些技术建立 ...

  5. MFC OnPaint()函数中最先调用CDialog::OnPaint()和最后调用CDialog::OnPaint()的巨大区别

    OnPaint()函数中最先调用CDialog::OnPaint()和最后调用CDialog::OnPaint()的巨大区别,如果没有注意这个问题就会出现无厘头式的绘图问题-- 效果就是出不来!在经过 ...

  6. <iOS小技巧> 返回上级目录操作Goback()方法

    Goback()方法功能:返回上一级界面,通过判断 popViewControllerAnimated 类型是否为空,来判断是present还是pop出来,然后直接做了releaseSelf操作: - ...

  7. 关于案例中核心dao的解释

    很多小伙伴不太理解核心dao,说这是干什么的,接下来我将一一为大家解答: 1.说到核心dao不得不说到单表操作,单表操作顾名思义是对单张数据库表的CRUD操作,实际情况中我们追求将表与表的关系映射到对 ...

  8. 作为服务注册中心,Eureka比Zookeeper好在哪里

    CAP是Consistency.Availablity和Partition Tolerance的缩写.一般的分布式系统最多满足其中两条.而Partition Tolerance是分布式系统的关键,因此 ...

  9. HBase 学习之路(八)——HBase协处理器

    一.简述 在使用HBase时,如果你的数据量达到了数十亿行或数百万列,此时能否在查询中返回大量数据将受制于网络的带宽,即便网络状况允许,但是客户端的计算处理也未必能够满足要求.在这种情况下,协处理器( ...

  10. ABP开发框架前后端开发系列---(13)高级查询功能及界面的处理

    在一般的检索界面中,基于界面易用和美观方便的考虑,我们往往只提供一些常用的条件查询进行列表数据的查询,但是有时候一些业务表字段很多,一些不常见的条件可能在某些场景下也需要用到.因此我们在通用的查询条件 ...