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
300
UltraGridExcelExporter. Value can not be null. Parameter name: key
posted

Good day.

After exporting filtered grid into excel I receiving datasheet with 

After you export the list to Excel, I get a list with the errors in the first column:

Value can not be null. Parameter name: key

Error in first column

In programm, I have double-type values in this column. For example: 3; 33; 25.8

Why do I receive this error? Key value for this column is present and correct.

Code for export is very simple:

Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter exp = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter();
string filename = StartupPath + "\\tmp.xls";
exp.Export(my_grid, filename);

Parents
  • 469350
    Offline posted

    Hi, 

    If the grid encounters an exception while exporting the value of a cell, it exports the Exception so you can see that something went wrong. This usually only happen on formula columns, though. Does this column have a formula applied to it?

    If so, something is probably going wrong while the exporter is trying to translate the grid formula into an Excel Formula. If that is the case, you might be able to get more information by trapping the FormulaExportError event of the UltraGridExcelExporter. Also, you could try setting ExportFormulas to false and see if the issue still occurs. That might be a viable workaround, if you just want to export the value and not the formula. And even if it's not a good workaround, it will, at least tell us if formulas are indeed the problem.

    If the formulas are causing the issue, then my best guess is that you are probably using an older version of the controls and you should try upgrading to the latest service release.

    If that doesn't help, then we probably need a sample demonstrating the error in order to help you any further.

Reply Children