将数据表中的数据写入Excel 2007工作表(xlsx) [英] Write Data From A DataTable To Excel 2007 Sheet ( xlsx )

查看:337
本文介绍了将数据表中的数据写入Excel 2007工作表(xlsx)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应将数据表中的数据(来自数据库)写入(保存)到excel工作表(2007).excel工作表是从模板中提取的.有人可以为我提供源代码(C#).

解决方案

http://www.developerfusion.com/tools/convert /vb-to-csharp/ [ ^ ]


选中此链接可以从DataGridView导出到excel
同样的逻辑也可以应用于从DataTable导出数据
http://vb.net-informations.com/excel-2007/vb.net_export_from_datagridview_to_excel.htm [^ ]


您可以通过以下链接将VB.NET代码转换为C#代码
http://www.developerfusion.com/tools/convert/vb-to-csharp/ [^ ]

希望这对您有所帮助.


检查这些链接,一定会对您有所帮助;
使用C#的具有DataSet和DataTable的水晶报表 [使用带有数据集的C#创建Crystal报表 [ ^ ]

The data in the datatable(from the database) should be written(save) to the excel sheet(2007).The excel sheet is a taken from a template. can somebody provide me with a source code(C#).

解决方案

http://vb.net-informations.com/excel-2007/vb.net_excel_2007_create_file.htm[^]

u can convert into C# using....http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]


Check this link to export from DataGridView to excel
same logic can be applied to export data from DataTable as well
http://vb.net-informations.com/excel-2007/vb.net_export_from_datagridview_to_excel.htm[^]


You can convert VB.NET code to C# code from following link
http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]

Hope this might help you.


Check these links,it will surely help you;
Crystal Report with DataSet and DataTable using C#[^]
Creating Crystal Reports using C# with Datasets[^]


这篇关于将数据表中的数据写入Excel 2007工作表(xlsx)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆