Home > Net >  The gridview export excle
The gridview export excle

Time:03-04

The gridview exported excle without borders,
How to add export excle border, thank you!

CodePudding user response:

You said "export", is to export a HTML file, but the. HTML suffix. Write for XLSX this form?

Derived this way is not the real excel, impossible to excel in the slightly more advanced features, no borders,

CodePudding user response:

You can continue to find information (introductory tutorial there is usually no), how to truly export a excel file, rather than export HTML files to pretend to be excel file,

CodePudding user response:

Please recommend solutions

CodePudding user response:

Using npoi, very simple, give you packaging, direct reference, baidu or CSDN on-site search, there are many tutorials

CodePudding user response:

Citing NPOI, directly

CodePudding user response:

A large quantity of data in EPPlus, small in either NPOI or EPPlus;
NPOI processing more than 65535 lines of die, some people say that can be configured, searched all didn't find the document; No which one has been measured on fast;
Tested in EPPlus export five hundred thousand sure, impression died more than 60, say is out of memory,

CodePudding user response:

XlWorkSheet. UsedRange. Borders. Graphics.linestyle=XlLineStyle. XlContinuous;

CodePudding user response:

Using npoi library, the basic format, also is easy to understand tutorial, border is ICellStyle directly the attribute is set inside the

Style. BorderBottom=BorderStyle. Thin;
Style. BorderLeft=BorderStyle. Thin;
Style. BorderRight=BorderStyle. Thin;
Style. BorderTop=BorderStyle. Thin;

Style. The Alignment=HorizontalAlignment. Center;
Style. The VerticalAlignment=VerticalAlignment. Center;
  •  Tags:  
  • C#
  • Related