jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Export to XML problem
Tagged: datagrid excel export, xls export
This topic contains 7 replies, has 2 voices, and was last updated by sintetik 10 years, 7 months ago.
-
AuthorExport to XML problem Posts
-
When I export to xls, the contents of the xml is exporting wrong data, look
<Row>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>ITEM</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Data</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Cód. Cliente</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Cliente</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Cód.Repres.</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Representante</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Kg</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Preço</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Código</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Descricao</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Total Item</Data></Cell>
<Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Observação</Data></Cell>
</Row>
<Row>
<Cell ss:StyleID=”xls-style-2″><Data ss:Type=”String”>12/31/1969</Data></Cell> ->> the originalk data is 999
<Cell ss:StyleID=”xls-style-3″><Data ss:Type=”String”>14/10/14</Data></Cell>
<Cell ss:StyleID=”xls-style-4″><Data ss:Type=”String”>12/31/1969</Data></Cell> ->> the original data is 800
<Cell ss:StyleID=”xls-style-3″><Data ss:Type=”String”>ADÃO – COPACABANA</Data></Cell>
<Cell ss:StyleID=”xls-style-4″><Data ss:Type=”String”>12/31/1969</Data></Cell> ->> the original data is 009
<Cell ss:StyleID=”xls-style-3″><Data ss:Type=”String”>VIVIAN</Data></Cell>
<Cell ss:StyleID=”xls-style-5″><Data ss:Type=”Number”>10</Data></Cell>
<Cell ss:StyleID=”xls-style-6″><Data ss:Type=”Number”>50</Data></Cell>
<Cell ss:StyleID=”xls-style-4″><Data ss:Type=”String”>12/31/1969</Data></Cell> ->> the original data is 600987
<Cell ss:StyleID=”xls-style-7″><Data ss:Type=”String”>CAMARAO 20/30 INTEIRO IQF CX 10KG</Data></Cell>
<Cell ss:StyleID=”xls-style-6″><Data ss:Type=”Number”>500</Data></Cell>
<Cell ss:StyleID=”xls-style-8″><Data ss:Type=”String”>12/31/1969</Data></Cell> ->> original field is a textThe bizarre is all them is filled with this data: 12/31/1969
Some help ?
and the same happens when export to CSV
thsi is the result in csv:
“ITEM”,”Data”,”Cód. Cliente”,”Cliente”,”Cód.Repres.”,”Representante”,”Kg”,”Preço”,”Código”,”Descricao”,”Total Item”,”Observação”
“12/31/1969″,”14/10/14″,”12/31/1969″,”ADÃO – COPACABANA”,”12/31/1969″,”VIVIAN”,”20,00″,”$ 50,00″,”12/31/1969″,”CAMARAO 20/30 INTEIRO IQF CX 10KG”,”$ 1.000,00″,”12/31/1969″
“12/31/1969″,”14/10/14″,”12/31/1969″,”ADÃO – COPACABANA”,”12/31/1969″,”VIVIAN”,”20,00″,”$ 60,00″,”12/31/1969″,”CAMARAO 16/20 INTEIRO IQF CX 10KG”,”$ 1.200,00″,”12/31/1969″Hi sintetik,
The problem is that you have missed to set the “type” setting of your source object’s datafields during the data binding of jqxGrid. This is mandatory setting and should never be omitted,
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Is this you talking about ? :
grdConfPed_settings.columns = [ _
{ text: “ITEM” , datafield: “item” , width: 45 , cellsalign: “RIGHT” , editable: False }, _
{ text: “Data” , datafield: “dataemi” , width: 80 , cellsalign: “right” , editable: False }, _
{ text: “Cód. Cliente” , datafield: “codcli” , width: 50 , cellsalign: “left” , editable: False },_
{ text: “Cliente” , datafield: “cliente” , width: 80 , cellsalign: “right” , editable: False }, _
{ text: “Cód.Repres.” , datafield: “codrepr” , width: 50 , cellsalign: “left” , editable: False }, _
{ text: “Representante” , datafield: “representa” , width: 80 , cellsalign: “right” , editable: False }, _
{ text: “Kg” , datafield: “quantidade” , width: 80 , cellsalign: “right”, cellsformat: “F2” },_
{ text: “Preço” , datafield: “preco” , width: 90 , cellsalign: “right”, cellsformat: “C2” },_
{ text: “Código” , datafield: “codigo” , width: 80 , cellsalign: “left” , editable: False},_
{ text: “Descricao” , datafield: “descricao” , width: 170 , cellsalign: “left” , editable: False } ,_
{ text: “Total Item” , datafield: “total” , width: 120 , cellsalign: “right”, cellsformat: “C2”, editable: False}, _
{ text: “Observação” , datafield: “observacao” , width: 300 , cellsalign: “right” , editable: True } _
]Ok, I saw the “syntax” and will apply , thank you so much
Didn´t work !
look the setup :
grdConfPed_settings.columns = [ _
{ text: “ID” , datafield: “id” , width: 45 , cellsalign: “RIGHT” , editable: False, columntype:”textbox” }, _
{ text: “Data” , datafield: “dataemi” , width: 80 , cellsalign: “right” , editable: False, columntype:”textbox” }, _
{ text: “Cód. Cliente” , datafield: “codcli” , width: 50 , cellsalign: “left” , editable: False, columntype:”textbox” },_
{ text: “Cliente” , datafield: “cliente” , width: 80 , cellsalign: “right” , editable: False, columntype:”textbox” }, _
{ text: “Cód.Repres.” , datafield: “codrepr” , width: 50 , cellsalign: “left” , editable: False, columntype:”textbox” }, _
{ text: “Representante” , datafield: “representa” , width: 80 , cellsalign: “right” , editable: False, columntype:”textbox” }, _
{ text: “Kg” , datafield: “quantidade” , width: 80 , cellsalign: “right”, cellsformat: “F2″, columntype:”numberinput” },_
{ text: “Preço” , datafield: “preco” , width: 90 , cellsalign: “right”, cellsformat: “C2″, columntype:”numberinput” },_
{ text: “Código” , datafield: “codigo” , width: 80 , cellsalign: “left” , editable: False, columntype:”textbox”},_
{ text: “Descricao” , datafield: “descricao” , width: 170 , cellsalign: “left” , editable: False, columntype:”textbox” } ,_
{ text: “Total Item” , datafield: “total” , width: 120 , cellsalign: “right”, cellsformat: “C2″, editable: False, columntype:”numberinput”}, _
{ text: “Observação” , datafield: “observacao” , width: 300 , cellsalign: “right” , editable: True, columntype:”textbox” } _
]Hehe !!!! It Workeeeeeeed !
Thanks !!!
-
AuthorPosts
You must be logged in to reply to this topic.