I have some problems using the Excel Exporter on a WHDG.
The grid and excel exporter:
The grid and the excel exporter are on the same asp:UpdatePanelThe grid does have a custom pager like the one of the samples (WebDataGrid)The grid uses a DataSet as DataSource that I rebind on every PostBack.
<ig:WebHierarchicalDataGrid ID="whdg" runat="server" Width="980px" AutoGenerateColumns="False" AutoGenerateBands="false" EnableAjax="true" EnableAjaxViewState="true" EnableTheming="true" EnableDataViewState="true" StyleSetName="Claymation" DataKeyFields="ID" InitialExpandDepth="0" InitialDataBindDepth="0" OnInitializeRow="whdg_InitializeRow" OnColumnSorted="whdg_ColumnSorted">
<ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="300" SlideCloseDirection="Auto" SlideCloseDuration="300"/>
<AjaxIndicator Enabled="True"/>
<Behaviors>
<ig:Activation Enabled="false">
</ig:Activation>
<ig:Sorting Enabled="true" SortingMode="Single">
<ColumnSettings>
<ig:SortingColumnSetting ColumnKey="TipoImage" Sortable="true"/>
<ig:SortingColumnSetting ColumnKey="Usuario" Sortable="true"/>
<ig:SortingColumnSetting ColumnKey="FechaHora" Sortable="true"/>
<ig:SortingColumnSetting ColumnKey="Accion" Sortable="true"/>
<ig:SortingColumnSetting ColumnKey="Mensaje" Sortable="true"/>
</ColumnSettings>
</ig:Sorting>
<ig:Paging Enabled="true">
<PagerTemplate>
<ag:WebDataGridPaginacion ID="whdgPaginacion" runat="server" OnPageChanged="whdgPaginacion_PageChanged"/>
</PagerTemplate>
</ig:Paging>
</Behaviors>
<EmptyRowsTemplate><div style="text-align:center;width:980px;padding:45px 0">No hay datos disponible.</div></EmptyRowsTemplate>
<Columns>
<ig:BoundDataField Key="ID" DataFieldName="SeguimientoID" Hidden="true"/>
<ig:BoundDataField Key="TipoImage" DataFieldName="Tipo" Header-Text="Tp" Width="36px"/>
<ig:BoundDataField Key="Usuario" DataFieldName="Usuario" Header-Text="Usuario" Width="142px"/>
<ig:BoundDataField Key="FechaHora" DataFieldName="FechaHora" Header-Text="Fecha y hora" Width="140px" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}"/>
<ig:BoundDataField Key="Accion" DataFieldName="Accion" Header-Text="Acción" Width="180px"/>
<ig:BoundDataField Key="Mensaje" DataFieldName="Mensaje" Header-Text="Mensaje" Width="452px"/>
</Columns>
</ig:WebHierarchicalDataGrid>
<ig:WebExcelExporter ID="WebExcelExporter1" runat="server" ExportMode="Download" DataExportMode="AllDataInDataSource" WorkbookFormat="Excel2007" EnableStylesExport="true" OnCellExporting="WebExcelExporter1_CellExporting"/>
Version: 10.3.20103.2105
Hi estanito,
It is possible that if you changed the styles, there may be some style we haven't run into that corrupts the files somehow. I am not enitirely sure. If you could attach a working samlple here that reproduces the corrupted file, we could try to debug it. Or contact Developer Support and work with them to build a sample.
thanks,Dave
Hi,
I was using the style set name Claymation, I made some personal changes to the styles, but that should not infuence the export of the styles.
I have attached the document so you guys can investigate it. (I rarred it to reduce size and make sure the upload no tampers the file.
I gave up the WebDataGrid and WebHierarchicalDataGrid for production, I have some in test that I am unable to manage fully like I could do with UltraWebGrid.
Are you exporting using one of our style sets? Or do you have some custom styles? If you could attach a sample where we can reproduce this corrupted file, we could see if it is a problem in our excel engine. As for adding leading rows and information. What you could try is to create the workbook and worksheet, set the values of some cells, then use the overload that takes a grid, worksheet and offsets
Export(WebHierarchicalDataGrid grid, Worksheet worksheet, int rowOffset, int columnOffset)
This should hopefully be what you're looking for.
regards,David Young