Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

Commented Unassigned: it makes me wonder why it's so solw when i export excel added cell style [12823]

$
0
0
ICellStyle cellstyle = workbook.CreateCellStyle();
//border
cellstyle.BorderBottom = BorderStyle.THIN;
cellstyle.BorderLeft = BorderStyle.THIN;
cellstyle.BorderRight = BorderStyle.THIN;
cellstyle.BorderTop = BorderStyle.THIN;
//font
IFont font = workbook.CreateFont();
font.FontName = "Aral";
font.Boldweight = (short)FontBoldWeight.BOLD;
cellstyle.SetFont(font);

I write above.When i export 7000 records to excel,It use 1h.But when i remove the style ,It only use 5s.
It's so unbelievable.

please help me
Comments: ** Comment from web user: tonyqus **

开中文吧,你是不是cellstyle每次循环都重新建? cellstyle可以复用。


Viewing all articles
Browse latest Browse all 1621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>