Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1000
Styling no exported
posted

I have some problems using the Excel Exporter on a WHDG.

  1. I am not able to export the Styles. When the feature is enabled, at opening the document I receive the following message: Excel found unreadable content in 'document.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes. After clicking yes, I see only the data, no styling. Clicking no does not open the document. When the feature is disabled, the document gets exported without styles.
  2. Is it possible to add leading rows with title or other information. Before I was using the UltraWebGridExcelExporter control and I was able to add this information.

The grid and excel exporter:

The grid and the excel exporter are on the same asp:UpdatePanel
The 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