I created custom admin grid in my module. And CSV Export for it works fine, but Excel XML Export does not contain any rows data
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet">
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"></OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"></ExcelWorkbook>
<Worksheet ss:Name="transactions_listing.xml"><Table><Row><Cell><Data ss:Type="String">Transaction ID</Data></Cell><Cell><Data ss:Type="String">Customer Name</Data></Cell><Cell><Data ss:Type="String">Amount</Data></Cell><Cell><Data ss:Type="String">Comment</Data></Cell><Cell><Data ss:Type="String">Created At</Data></Cell></Row></Table></Worksheet>
</Workbook>
So, there are only column names in it
Any ideas why's that?
asked Jul 26, 2016 at 8:48
Anna
1,6852 gold badges24 silver badges47 bronze badges
1 Answer 1
It works after I added this to my Collection.php
/**
* Id field name
* @var string
*/
protected $_idFieldName = 'transaction_id';
answered Jul 26, 2016 at 12:32
Anna
1,6852 gold badges24 silver badges47 bronze badges
-
i am also facing same issue...can you post complete answer .Anand Ontigeri– Anand Ontigeri2017年02月23日 08:42:00 +00:00Commented Feb 23, 2017 at 8:42
default