[DevExpress Support Team: CLONED FROM T280404: ASPxGridViewExporter - e.Value is always null in the XlsxExportOptionsEx.CustomizeCell event]
Hello Nataly,
but your solution remove formula. For us it is the best solution to preserve formula.
but i don't understant why you add support for changing format in data area
https://www.devexpress.com/Support/Center/Question/Details/T253075
and omit the same option for formulas in summary area
Thank you for the clarification
ASPxGridViewExporter - Custom formatting is not applied to summary cells in the XlsxExportOptionsEx.CustomizeCell event
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
- v15.2.4Download Official Update
- v15.1.8Download Official Update
Hello,
I have forwarded the inquiry to our developers for more detailed research. We will inform you as soon as we have any updates regarding the issue.
Hello,
I am happy to inform you that we have found a workaround for the issue. You can define the formatting as follows:
e.Formatting.FormatType = DevExpress.Utils.FormatType.DateTime; e.Formatting.NumberFormat = XlNumberFormat.LongTime24; e.Handled = true;
Please see the attached project.
Hi Nataly,
your solution not work. We would like to use this custom format ([h]:mm)
e.Formatting.NumberFormat = "[h]:mm";
And this custom format not work for summary row.
Thank you
Hello,
Here is the project created based on my previous suggestion, where custom formatting is applied for the summary cells. See the attached screencast demonstrating it in action. Please note that e.Formatting.NumberFormat has no effect if e.Formatting.FormatString is defined.
Hi Nataly,
you don't understand my requirements. Your example not contain formula in exported cell.
Thera are my requirements:
Code in my example which calculating custom summary is neccesary because your grid does not allow summary over time column.
Export of time column with summary formula could be done by this two ways
First and second approach produces the same output.
Same requirements was in my first problem
https://www.devexpress.com/Support/Center/Question/Details/T280404
Unfortunately, it was not understood and then was created this clone.
Thank you
Hello,
Please accept my apologies for missing that. You are right, the workaround is not effective under such conditions. We will do our best to find another solution and are actively researching its source now.