Slow loading of .CSV files using EPPLUS

后端 未结 2 1084
后悔当初
后悔当初 2021-01-06 13:55

I have loads of .csv files I need to convert to .xslx after applying some formatting.

A file containing approx 20 000 rows and 7 columns takes 12 minutes to convert.

2条回答
  •  醉梦人生
    2021-01-06 14:19

    I ran into a very similar problem with LoadFromCollection. EPPlus has to account for all situations in their methods to load data generically like that so there is a good deal of overhead. I ended up narrowing done the bottleneck to that method and ended up just manually coverting the data from the collection to Excel Cell object in EPPlus. Probably saved several minutes in my exports.

    Plenty of examples on how to read csv data:

    C# Read a particular value from CSV file

提交回复
热议问题