Description:
I'm using the exporting to Excel feature of the XtraGrid. I've noticed, that grid column display formats are not taken into account, if the GridViewExportLink.ExportCellsAsDisplayText property is set to False. Is this the expected behavior?
Answer:
.NET and Excel formats are incompatible. We have not yet found a good solution to convert .NET formats to Excel formats. We will continue our investigation.
You can try to reset the GridViewExportLink.ExportCellsAsDisplayText property to True (the default value) and check whether the result of exporting meets your requirements.
See also:
Numeric values are exported to Excel as strings
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Is it possible to set at Design time?
Hi,
Since the ExportXlsProvider is not a design-time created item, there is no opportunity to specify the mentioned property value in the VS designer.
But I suggest you take a look at the RepositoryItem.ExportMode property value. You can assign specific RepositoryItem instances with the GridColumn.ColumnEdit property value in the designer, and set the RepositoryItem.ExportMode property to the DisplayText value.
Please refer to the following documentation topic to learn more about "Repositories and Repository Items".
I hope you will find this information helpful.