Current filter:
                                You should refresh the page.
                                  • Hello guys,

                                    We are using ExportType.WYSIWYG to exprot some grids in xsl. I would like to modify some formats before export in xls. I tried to use ExportType.DataAware but after export there is no colors and fonts formating. Unfortunately WYSIWYG doesn't use CustomizeCellEventArgs.

                                    Is it any possibilities to add some chnages to format in WYSIWYG or can I recieve all the proper colors and fonts in DataAware?

                                     

                                Show all comments
                                • Maxim L (DevExpress Support) 10.08.2019

                                  Hi,
                                  To provide you with a solution, we need to better understand what task you are trying to solve. So, please clarify how you want to adjust your exported document. It would be great if you send us a sample project generating your current exported document and the screenshot of the required document.
                                  I hope to hear from you soon.

                                • Customer75267 10.08.2019

                                  Hi Maxim

                                  I want to aplly different format rules if they are exists in dictionary. In attached scenario I want to change Start Time column to MM/DD/YYYY format e.g.. Another scenario I need to change Number to #,##0.00_);[Red](#,##0.00) format and etc.

                                  When I'm using ExportType.WYSIWIG I don't enter in Options_CustomizeCell event. When I'm using ExportType.DataAware It looses all other formating rules such as color of the headers, fonts etc. You can see this difference in the attached documents.

                                  Thank you in advance .

                                • Vladislav (DevExpress Support) 10.09.2019

                                  Hi,

                                  Thank you for the clarification.
                                  The CustomizeCell event is available only in data-aware export mode. This point is also reflected in our documentation.
                                  It is possible to accomplish this task in both modes. The Data Aware mode provides the capability to customize exported cells' Font and BackColor via the CustomizeCell event.
                                  As for the WYSIWYG mode, I suggest that you specify cells' format using the DisplayFormat property. It is taken into account when the grid is exported/printed.
                                  Please try this approach and let us know if you need further assistance.

                                • Customer75267 10.10.2019

                                  In some cases Excel formats don't match to C# formats, #,##0.00_);[Red](#,##0.00) e.g. That is why I can't use DisplayFormat property.

                                  Is there any posibilites to save default appearences in DataAware mode?

                                • Vladislav (DevExpress Support) 10.11.2019

                                  Hello,

                                  You can customize exported cells' appearance using the CustomizeCell event. To obtain the current appearance settings of the Data Grid, I suggest that you use the PaintAppearance property. Do this in the following manner:

                                  [C#]
                                  private void Options_CustomizeCell(DevExpress.Export.CustomizeCellEventArgs e) { e.Formatting.Font.Size = gridView1.PaintAppearance.Row.Font.Size; e.Formatting.Font.Name = gridView1.PaintAppearance.Row.Font.Name; if(e.AreaType == DevExpress.Export.SheetAreaType.Header) { DevExpress.Export.Xl.XlCellAlignment alignment = new DevExpress.Export.Xl.XlCellAlignment(); alignment.HorizontalAlignment = DevExpress.Export.Xl.XlHorizontalAlignment.Center; e.Formatting.Alignment = alignment; e.Formatting.BackColor = gridView1.PaintAppearance.HeaderPanel.BackColor; } e.Handled = true; }

                                  Please let me know if I can be of more help.

                                • Customer75267 10.16.2019

                                  Thank you! It helped me.

                                • Vladislav (DevExpress Support) 10.16.2019

                                  You are always welcome.

                                0 Solutions

                                Creation Date Importance Sort by