Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Format Data when Exporting To Excel in Xlsx Format

$
0
0

Hi Konstantin,

Thanks for the reply, this works perfectly. I implemented slightly differently, but this is definitely the working principle. 

Because I knew that I had a single column, in which every row needed to be formatted as text, i simply grabbed all the columns and then implemented your solution on all the rows. Thanks again for the great solution.

 

        protected void rgrBoundaryDefinitionList_InfrastructureExporting(object sender, GridInfrastructureExportingEventArgs e)
        {
            var cols = e.ExportStructure.Tables[0].Columns;
            var columnCount = cols.Count;
 
            for (int i = 1; i <= cols[1].Cells.Count; i++)
            {
                cols[1].Cells[1, i].Format = "@";
            }
}

Viewing all articles
Browse latest Browse all 84751

Trending Articles



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