We are reading an existing excel spreadsheet in to get the column headings and three rows of other headings. Then we export our data below that. Problem is excel exporter is resizing the column widths. Is there a way for the excel exporter to not re-size the columns.
Hello Pete,
In order to implement this behavior you can use GridFieldCaptionExporting event and set the column width as I have shown in below thread:
http://es.infragistics.com/community/forums/p/73833/380215.aspx
You can also save the value of the other rows in some session variable and retrieve in GridFieldCaptionExporting event. Once you have access to the values you may set the exported column width based on your requirements.
I hope this helps.
The thing is... we don't want the column widths to be changed. We are using an existing Excel file as a "template" and place the data into the existing Excel file.
I am just following up to see if you need any further assistance with this matter.
Thank you for the update. Based on functionality you mentioned I would recommend you to store column width of the existing Excel file in session variable. You can retrieve the value of the width from the session variable and set the width of the column to that width in GridFieldCaptionExporting event.