Excel export of grid with resized column width not working

Hey guys! 

It seems like I am unable to export an excel file out of the grid after resizing a column. 

I see Convert.ToInt32 calls with decimals in line 983 of the GridExcelExport.cs in the ProcessHeaderContent method.

if (((!(!this.IsAutoFit & flag2) ? 0 : (gridColumn.Visible ? 1 : (this.IsHideColumnIncude ? 1 : 0))) & (flag1 ? 1 : 0)) != 0 && gridColumn.Width != null && (gridColumn.Width.ToString().IndexOf("%") == -1 && gridColumn.Type != ColumnType.CheckBox))
this.Sheet.Columns[this.colIndex - 1].Width = string.IsNullOrEmpty(gridColumn.Width) || !(gridColumn.Width != "auto") ? 120 : (gridColumn.Width.IndexOf("px") > 0 ? Convert.ToInt32(gridColumn.Width.Split("px")[0]) : Convert.ToInt32(gridColumn.Width));


the gridColumn.Width is like 216,5. Is this a bug or am i doing something wrong? 


Best regards


1 Reply

VN Vignesh Natarajan Syncfusion Team July 26, 2021 09:26 AM UTC

Hi Patrick, 
 
Thanks for contacting Syncfusion support.   
 
Query: “It seems like I am unable to export an excel file out of the grid after resizing a column. 
 
We have analyzed the reported issue and we are able to reproduce the reported issue at our end also. We have confirmed the reported query as a bug and logged the defect report “Not able to export the Grid data after resizing the column for the same. Thank you for taking the time to report this issue and helping us improve our product. Fix for the defect will be included in our weekly release which is expected to be rolled out by end of August 2021. We will update you once the release is rolled out.     
        
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.        
    
 
Till then we appreciate your patience. 
 
Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon