GridView exports common text formats in Excel
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!