I have a form with an UltraWinGrid, an UltraNumericEditor, an UltraCalcManager, and an UltraExcelExporter.
The WinGrid has an unbound column that contains a formula. The formula refers to another column in the row and the value of the UltranumbericEditor. It calculates and displays as expected on the grid on the form.
When I attempt to export the grid to Excel, I get one of two behaviours neither of which is what I want.
If ExportFormulas is false, then all the values in the calculated column are exported as text.
If ExportFormulas is true on the ExcelExporter, the column with the formula is all errors which I'd expect because the UltraNumbericEditor control isn't part of the exported worksheet.
Is there a way I can have the formula substitute the value of the UltraNumericEditor for the representation of the editor in the formula so things export as values? I can do it in code, but it requires the user to click on a button.
Hi,
Let me know if you need any additional assistance.
Regards,
Stefaniya
I'd use the UltraGridExcelExporters FormulaExported event. You can examine e.WorksheetCell.Formula and look for the name of your NumericEditor control and then apply a new formula to the cell with a literal value in it in place of that name.