开发者

Opening a huge .csv file with Excel Interop

开发者 https://www.devze.com 2022-12-28 11:18 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号