Click here to Skip to main content
15,898,995 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am exporting a datatable to an excel file using EPPlus and the applying styles for some range of cells before exporting.Because of the styles, the file size increases drastically to 5 MB. When I export the same without applying any styles its size is 400 kb. What is the problem?? and what is its solution?
Posted
Updated 29-Jul-13 23:17pm
v2
Comments
Sergey Alexandrovich Kryukov 30-Jul-13 1:25am    
Not enough information...
—SA

The problem is that you are 'embedding' the styles from the EEPlus. These FONT FILES are not located with the FONT FILES in the C:\Windows\system or C:\Windows\System32 locations for fonts. It may be that the style fonts provided by EEPlus are proprietary, and need to be embedded in order for them to be displayed at all. If you can load/apply the style files prior to loading (like in a batch file of some sorts) the actual excel workbook file, then your file will be smaller, or if someone else needs to see them, then install them (style files and any supporting DLLs) on the system where the excel file is going.
 
Share this answer
 
v3
Not enough information to answer this somewhat vague question. You can research the problem if your Excel supports *.xlsx files. This format is XML based and packed using ZIP algorithm. So, you can unpack the files (for this purpose, you may need to rename "*.xlsx" to "*.zip") and study and compare their content. You can use, in particular, XML viewers of Visual Studio or any other, some file comparison tools, etc.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900