可以自己写代码,应用EXCEL来开发
不过牛人都写好给你了,你可以使用如GOLDPRINTER来进行开发

解决方案 »

  1.   

    ref:
    http://dotnet.aspx.cc/ShowDetail.aspx?id=BF0A54F9-C7C7-4200-BD9A-802AC1F5DE50
      

  2.   

    把要导出的数据放到一个DataTable里,然后再导出Excel文件。网上有好多关于将DataTable数据导入Excel的资料,楼主可搜索一下。http://blog.csdn.net/alexathena/archive/2007/06/14/1651870.aspxhttp://blog.sina.com.cn/u/4b2f9576010006ay
      

  3.   

    Excel.ApplicationClass excelApp;
                excelApp = new Excel.ApplicationClass();
                Excel.Workbook excelBook = excelApp.Workbooks.Add(1);
                Excel.Worksheet excelSheet = (Excel.Worksheet)excelBook.Worksheets[1];
                excelApp.Visible = true;            ////设置显示格式
                //int count = dataGridView1.Columns.Count;
                //string str = "";
                //while (count > 0)
                //{
                //    str = Convert.ToChar('A' + (count + 25) % 26).ToString() + str;
                //    count = (count - 1) / 26;
                //}                      
                int i;
                int j;
                int k;
                for (i = 0; i < dataGridView1.ColumnCount; i++)                    //定义excel表头
                {
                    excelSheet.Cells[1,i + 1] = dataGridView1.Columns[i].Name;            
                }
                for (k = 0; k < dataGridView1.RowCount; k++)                        //把数据导出去excel
                {
                    for (j = 0; j < dataGridView1.ColumnCount; j++)
                    {
                        excelSheet.Cells[k + 2, j + 1] = dataGridView1.Rows[k].Cells[j].Value;
                    }
                }自认为最简单的方法。直接操作excelSheet跟datagridview就可以了