We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Problem with excel content file after upgrading to latest version of control

Hi,

After upgrading controls to 16.4.47 version, excel exported files from grid control appears to be corrupted.
When I try to open in excel I received the error to recover the file and after the recovering process I can see the next information:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>Reparar resultado para Facturacion_24-01-20190.xml</logFileName><summary>Se han detectado errores en el archivo "/Users/jlgarcia/Downloads/Facturacion_24-01-2019.xlsx"</summary><repairedRecords summary="A continuación se muestra una lista de reparaciones:"><repairedRecord>Registros reparados: Formato de /xl/styles.xml parte (Estilos)</repairedRecord></repairedRecords></recoveryLog>


With previous version 16.4.44 works fine.

I'm working with mac and Office for mac. I've not tried with Windows versions.

Regards
Jose

3 Replies

PS Pavithra Subramaniyam Syncfusion Team January 25, 2019 11:51 AM UTC

Hi Jose, 
 
Thanks for contacting Syncfusion support. 
 
We have tried to reproduce the reported problem in Syncfusion v.16.4.47. But the excel exporting works fine and the exported excel file opens fine in the Office for MAC and windows office. Please find the sample link below, 
 
Please refer the screenshot below, 
 
 
 
If you are still facing the problem please get back to us with the following details, 
 
  1. Share the exact scenario/proper replication procedure.
  2. Share a video demonstration of the problem you are facing.
  3. Share the details about the Office version you are trying to open the file.
 
Please get back to us if you need further assistance. 
 
Regards, 
Pavithra S. 
 



JL Jose Luis Garcia January 28, 2019 02:48 PM UTC

Hi Pavithra,

This is my grid code:

<ejs-grid #collectionsGrid id="collectionsGrid" [dataSource]="collections" [allowSorting]="true" [allowMultiSorting]="true"
[allowGrouping]="true" [allowFiltering]="true" [filterSettings]="filterOptions"
[allowExcelExport]="true" [toolbar]="toolbarOptions" (toolbarClick)="onToolbarClick($event)"
[showColumnChooser]="true" width="auto" height="300">
<e-columns>
<e-column headerText="Factura" width="150">
<ng-template #template let-data>
<a [routerLink]="['/project-edit', data.projectId, 0]" target="_blank">{{ data.invoiceCode }}</a>
</ng-template>
</e-column>
<e-column field="invoiceDate" headerText="Fecha" type="date" format="yMd" [allowFiltering]="false" width="150"></e-column>
<e-column field="dueDate" headerText="Fecha Vto." type="date" format="yMd" [allowFiltering]="false" width="150"></e-column>
<e-column field="description" headerText="Descripción" width="200"></e-column>
<e-column field="paid" headerText="Cobrada" [displayAsCheckBox]="true" textAlign="Center" width="125"></e-column>
<e-column field="company" headerText="Compañía" width="150"></e-column>
<e-column field="customer" headerText="Cliente" width="150"></e-column>
<e-column field="salesman" headerText="Comercial" width="150"></e-column>
<e-column field="amount" headerText="Importe" type="number" format="C" textAlign="Right" width="150"></e-column>
<e-column field="gp" headerText="GP" type="number" format="C" textAlign="Right" width="150"></e-column>
<e-column field="gpPercentage" headerText="GP %" type="number" format="P2" textAlign="Right" width="100"></e-column>
</e-columns>
<e-aggregates>
<e-aggregate>
<e-columns>
<e-column field="amount" type="sum" textAlign="Right">
<ng-template #groupCaptionTemplate let-data>{{ data.sum | currency : 'EUR' : 'symbol' : '.2' }}</ng-template>
</e-column>
<e-column field="amount" type="sum" textAlign="Right">
<ng-template #footerTemplate let-data>{{ data.sum | currency : 'EUR' : 'symbol' : '.2' }}</ng-template>
</e-column>
<e-column field="gp" type="sum" textAlign="Right">
<ng-template #groupCaptionTemplate let-data>{{ data.sum | currency : 'EUR' : 'symbol' : '.2' }}</ng-template>
</e-column>
<e-column field="gp" type="sum" textAlign="Right">
<ng-template #footerTemplate let-data>{{ data.sum | currency : 'EUR' : 'symbol' : '.2' }}</ng-template>
</e-column>
<e-column field="gpPercentage" type="Custom" [customAggregate]="customAggregateFn" textAlign="Right">
<ng-template #groupCaptionTemplate let-data>{{ data.Custom | percent : '1.2-2' }}</ng-template>
</e-column>
<e-column field="gpPercentage" type="Custom" [customAggregate]="customAggregateFn" textAlign="Right">
<ng-template #footerTemplate let-data>{{ data.Custom | percent : '1.2-2' }}</ng-template>
</e-column>
</e-columns>
</e-aggregate>
</e-aggregates>
</ejs-grid>

and this is the code to calculate custom aggregates:

public customAggregateFn: Function = (data: Object[]) => {
return data['aggregates'] ? data['aggregates']['gp - sum'] / data['aggregates']['amount - sum'] : 0;
}

My Excel version is 16.21.1 (190123).
I'm attaching an excel file generated with the error.

Just one more point, after excel open the file and repair it all data it's ok. I think there is only a problem with styles. 

Regards
Jose



Attachment: Facturacion_28012019_(2).xlsx_a1350ddb.zip


TS Thavasianand Sankaranarayanan Syncfusion Team January 30, 2019 11:43 AM UTC

Hi Jose, 

We tried to reproduce the problem with the provided code example by creating a sample from our side with the same codes which you have shared. But still we could not reproduce the reported problem. The exported excel file opens fine with our system. Please refer the sample link below, 
 
If you are still facing the issue, please get back to us with a simple issue reproducing sample or reproduce the issue with the attached sample link. 

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Thavasianand S. 


Loader.
Live Chat Icon For mobile
Up arrow icon