Opening a huge .csv file with Excel Interop
I have an application that write huge .csv files about the size ranging from 1 GB to 2 GB.
I need to color code the file and save it as .xlsx.
So I have tried using Excel Interop and it works great for small files, but when I try to open a 1.3 GB .csv file with Excel, I get an Hresult error.
Any ideas as to how I could accomplish this task either with using Excel, or if there is any other way of doi开发者_开发百科ng it.
Are you exceeding 1M rows ? Maybe thats the reason for the HRESULT error.
64K rows max before Excel 2007. 1M rows for 2007
There are ways to write and read excel files without using the excel interop. I'm pretty sure I remember microsoft themself have open specifications on the excel fileformat.
Thanks for the responses guys, after thinking about it, I have decided to simply use the .csv file.
精彩评论