使用大约40列或更多列将数据导出到Excel [英] Exporting data to excel with about 40 or more columns

查看:102
本文介绍了使用大约40列或更多列将数据导出到Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何导出大约40个字段或更多字段的数据,以便在C#clint和MS-SQL-SERVER的excel中生成40列或更多列



我尝试了什么:



适用于水晶报告作者,有限数量的字段说多达15个字段

How do you export data with about 40 fields or more to generate 40 columns or more in excel from C# clint and MS-SQL-SERVER

What I have tried:

Works well with crystal report writer with a limited number of fields say up to 15 fields

推荐答案

检查此问题和答案:当工作表名称未知时如何将excel文件上传到db C# [ ^ ]



在那里,您将找到一种方法来读取Excel文件并将数据上载到MS SQL Server。

祝你好运!
Check this question and answers: How to upload excel file to db when sheet name is unknown C#[^]

There you'll find a method to read Excel file and upload data to MS SQL Server.
Good luck!


如果你真的需要将数据导出为文件......



以XML格式从数据库中导出它。列数仅受Excel中可以包含的列数的限制,Excel可以是真正的XML文件。



如果可以,请创建一个cdata连接excel将从数据库中提取数据,而不需要中间的创建文件步骤。
If you really need to export the data as a file...

Export it from the database as XML. The number of columns is only limited by the number of columns you can have in Excel, and Excel can real XML files.

If you can, create a cdata connection in excel that will pull the data from the database without the intermediate "create a file" step.


这篇关于使用大约40列或更多列将数据导出到Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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