导出excel 提示错误
cellRow value 65536 must be between 1 and 65534/// <summary>
        /// 创建一个Excel文件(MyXls) 
        /// </summary>
        /// <param name="strPath">文件路径</param>
        /// <param name="strFileName">文件名</param>
        /// <param name="dtClolumn">列定义</param>
        /// <param name="dtData">数据</param>
        public static void CreateExcelFile(string strPath, string strFileName, DataTable dtClolumn, DataTable dtData)
        {
            XlsDocument doc = new XlsDocument();
            doc.DocumentSummaryInformation.Company = "ZHX SOFTWARE";
            doc.FileName = strFileName;
            Worksheet sheet = doc.Workbook.Worksheets.Add("Data");
            org.in2bits.MyXls.Cell cell;            XF cellXF = doc.NewXF();
            
            cellXF.VerticalAlignment = VerticalAlignments.Centered;
            cellXF.HorizontalAlignment = org.in2bits.MyXls.HorizontalAlignments.Centered;
            cellXF.Font.FontName = "Arial";
            //cellXF.Font.Height = 48 * 20; 
            cellXF.Font.Bold = false;
            cellXF.Pattern = 1;//设定单元格填充风格。如果设定为0,则是纯色填充(无色),1代表没有间隙的实色 
            cellXF.PatternColor = Colors.Grey;//设定填充线条的颜色 
            cellXF.PatternBackgroundColor = Colors.Grey;//填充的底色 
            
            int n;
            DataView dvClolumn = dtClolumn.DefaultView;
            dvClolumn.RowFilter = " isnull(groupname,'')<>'' ";           
            //多抬头处理
            if (dvClolumn.Count > 0)
            {
                n = 1;
                for (int i = 0; i < dtClolumn.Rows.Count; i++)
                {
                    cell = sheet.Cells.Add(1, i + 1, dtClolumn.Rows[i]["Caption"].ToString(), cellXF);
                }                string groupname = "";
                string old_groupname = "";
                for (int i = 0; i < dtClolumn.Rows.Count; i++)
                {
                    groupname = dtClolumn.Rows[i]["groupname"].ToString();
                    //左右单元格合并
                    if (groupname != "")
                    {
                        if (old_groupname != groupname)
                        {
                            dvClolumn.RowFilter = " groupname='" + groupname + "'";
                            int j = dvClolumn.Count + i;
                            MergeArea meaa = new MergeArea(1, 1, i + 1, j);//一个合并单元格实例(合并第1行、第2例 到 第5行、第7例) 
                            sheet.AddMergeArea(meaa);//填加合并单元格 
                            cell = sheet.Cells.Add(1, i + 1, groupname);
                            i = j - 1;
                        }
                        old_groupname = groupname;
                    }
                    else
                    {
                        //上下单元格合并
                        MergeArea meaa = new MergeArea(1, 2, i + 1, i + 1);
                        sheet.AddMergeArea(meaa);
                        cell = sheet.Cells.Add(1, i + 1, dtClolumn.Rows[i]["Caption"].ToString());
                    }
                }
            }
            else
            {
                n = 0;
            }            //列头定义
            for (int i = 0; i < dtClolumn.Rows.Count; i++)
            {
                SetCloumnWidth(doc, sheet, i, int.Parse(dtClolumn.Rows[i]["width"].ToString()));
                cell = sheet.Cells.Add(n + 1, i + 1, dtClolumn.Rows[i]["Caption"].ToString(), cellXF);
            }            //数据
            cellXF.Pattern = 0;
            object val = "";
            string dtype = "";
            for (int i = 0; i < dtData.Rows.Count; i++)
            {
                for (int j = 0; j < dtClolumn.Rows.Count; j++)
                {
                    val = dtData.Rows[i][j] == DBNull.Value ? "" : dtData.Rows[i][j].ToString();
                    //val = val.ToString().Trim() == "" ? "" : val;
                    dtype = dtData.Rows[i][j].GetType().Name;
                    if (val.ToString() != "")
                    {
                       val = Convert.ToString(val);
                        cell = sheet.Cells.Add(i + n + 2, j + 1, val, cellXF);
                    }
                }
            }            dtClolumn.Dispose();
            dtData.Dispose();
            doc.Save(strPath, true);
        }