Get the App
SLTechnology News&Howtos  ›  Development  › 

GridView exports common text formats in Excel

Shulou Source: shulou.com Published: 2022-06-03 19:40:24 10月03日 Update

This article mainly explains the "GridView export Excel common text format", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "GridView export Excel common text format"!

1) text: vnd.ms-excel.numberformat:@

2) date: vnd.ms-excel.numberformat:yyyy/mm/dd

3) number: vnd.ms-excel.numberformat:#,##0.00

4) currency: vnd.ms-excel.numberformat: ¥#, # # 0.00

5) percentage: vnd.ms-excel.numberformat: # 0.005%

Usage: add the code e.Row.Cells [0] .Attributes. Add ("style", "vnd.ms-excel.numberformat:@") to the RowDataBound event of GridView

Thank you for your reading, the above is the content of "GridView Export Excel common text format", after the study of this article, I believe you have a deeper understanding of the problem of GridView export Excel common text format, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Text common formatting learning content event code that is ideas situations numbers articles dates more percentage percentage knowledge knowledge points articles currency Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Redmi Shulou Technology Microsoft Huawei