Epplus row height issue

旧城冷巷雨未停 提交于 2019-12-11 06:44:04

问题


I have an excel file with over 1000 rows. Each row contains some data and 2 images. The images are attached as OfficeOpenXml.Drawing.eEditAs.OneCell

After populating the Excel I run this, to set the row height.

int prodTableStart = 3;
int prodTableEnd = 1025;

while (prodTableStart <= prodTableEnd)
{
    ws.Row(prodTableStart).Height = 112d; // works, but mega slow
    prodTableStart++;
}

I tried to speed up with something like this: ws.Cells["A" + prodTableStart + ":L" + prodTableEnd].Rows but that returns an int? So how can I set the row height efficient on a selected range of rows?

When I have so many rows, it even never ends. No exception is thrown. The process just takes for ever.

ps. I am using epplus latest nuget (4.1.0) on .Net 4.6.2 in C#

来源:https://stackoverflow.com/questions/44925549/epplus-row-height-issue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!