Posted 15 January 2026, 9:24 am EST
Hello Tom,
The content of hosted controls is not exported to Excel because FlexGrid has no knowledge of the embedded controls. Additionally, Excel itself does not support embedding arbitrary UI controls within a row, so only the parent grid row is exported when using SaveExcel.
In scenarios like this, the recommended approach is to flatten the data structure before or during export, which aligns with what Wolfgang suggested. A possible workflow would be:
- Export the main FlexGrid to Excel.
- Load the generated file into a C1XLBook object
(https://developer.mescius.com/componentone/docs/win/online-excel/overview).
- For each hosted (child) FlexGrid:
a. Export the child grid to Excel.
b. Load the exported child grid’s excel content into a C1XLBook object.
c. Copy the child rows into the main worksheet at the appropriate location
(https://developer.mescius.com/componentone/docs/win/online-excel/copysheets).
This approach effectively converts the parent–child UI hierarchy into a structure that Excel can represent.
Please let us know if this helps. If your requirement is different, or if our understanding is not fully accurate, it would be helpful to know how these hosted controls are implemented (for example, whether you are using RowDetails) and if there are any additional requirements.
If possible, sharing a small sample project would allow us to provide a more precise solution.
P.S. Thank you, Wolfgang, for your inputs.
Regards,
Utkarsh