如何在asp.net c#中导出到excel时减小文件大小?

如何在asp.net c#中导出到excel时减小文件大小?

问题描述:

先生,

我开发了将数据集值导出为ex​​cel的应用程序。我在表中有10,500条记录和17列。如果我导出

到Excel文件,它需要超过25 MB,我无法打开导出的Excel文件,它显示加载符号很长一段时间。

请给我这个问题的解决方案。

Hi sir,
I developed application that exports dataset value to excel. I am having 10,500 records and 17 columns in the table. If i export
to excel file, it takes more than 25 MB, i cant able to open the exported excel file, it shows loading symbol for long time.
Kindly give me the solution for this problem.

我认为最快的解决方案是将数据导出为CSV。这应该会显着减小文件大小,您可以在Excel中轻松打开CSV文件。
I think the quickest solution is to export data as CSV. This should significantly reduce the file size and you can easily open a CSV file in Excel.