Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Excel export wrong conversion of format strings
posted

Since last week we are using an new version of infragistics 2014.1, before we've used infragistics  2010.1.
Our software is build for europe purposes and we are using specific kind of format strings.
Before the update the format strings we're build up as followed:

 private void ultraGridExcelExporter_InitializeColumn(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.InitializeColumnEventArgs e)
         {
              //Adds a currency in excel
              if (e.Column.Format == "C" || e.Column.Style == Infragistics.Win.UltraWinGrid.ColumnStyle.Currency)
              {
                e.ExcelFormatStr = "€ ###,###,##0.00";
               }
              else if ((e.Column.MaskInput ?? "").Contains("%"))
              {
                  e.ExcelFormatStr = "0.##";
              }
         }

Our grid:


In the Excel export was the following format string attached to the column:



Now with the new infragistics the format string is build up wrong:




We think this is due to the new version of Infragistics because we didn't change the code.
We already tried to set the formatinfo of the column to the dutch cultureinfo but this didn't help:
private void ultraGridExcelExporter1_InitializeColumn(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.InitializeColumnEventArgs e)
        {
            //Adds a currency in excel
            if (e.Column.Format == "C" || e.Column.Style == Infragistics.Win.UltraWinGrid.ColumnStyle.Currency)
            {
                e.ExcelFormatStr = "€ ###,###,##0.00";
                e.Column.FormatInfo = new System.Globalization.CultureInfo("NL-nl");
            }
            else if ((e.Column.MaskInput ?? "").Contains("%"))
            {
                e.ExcelFormatStr = "0.##";
            }
        }

Parents
No Data
Reply
  • 29045
    Offline posted

    Hello,

    Please check again to make sure all of your images were attached properly to this forum post. It looks like two or more may have not been uploaded properly. You can instead zip them and label them as such.

    Also, would it be possible to provide us with a sample/steps that reproduces this behavior?

     

Children