Export Gridview Data to Excel from WebPage with formatting

Jul 1 2016 2:22 AM
Hi,
I have a gridview populated and on a button click I am exporting it to an Excel spreadsheet. This is working absolutely fine. The problem is that there are about 8 columns of data that is being exported and what I need to do is that to have the first 5 columns formatted as text and the last 3 columns to be formatted as numbers. I did see using Open XML probably I can format it accordingly but need solution suggestions and some sample code to get it to work. Thanks in advance.

Answers (6)