@ 880,400 BTNBMP oBtn1 OF oDlg SIZE 200, 30 NOBORDER PROMPT "Prijswijzigingen naar Exel" 2007 TOOLTIP "Tool1" ACTION exportdata(obrw4)
- Code: Select all Expand view
- function exportdata(oBrw)
select nofoto
set filter to nofoto->selected
oBrw:refresh()
oBrw:ToExcel( NIL,NIL, { oBrw:oCol( "Id" ), oBrw:oCol( "Brandid" ), oBrw:oCol( "Benaming" ) } )
//METHOD ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF ) CLASS TXBrowse
set filter to
oBrw:refresh()
return
I get a excel with the 3 columns = OK, but i also get 3 group headers (Webshop, Maveco, Brand)
These groupheaders are coded in xbrowse setup :
:SetGroupHeader( "Webshop", oBrw4:oCol("Shopprijs"):nCreationOrder, oBrw4:oCol("Shopmarge"):nCreationOrder )
:SetGroupHeader( "Brand", oBrw4:oCol("Bruto"):nCreationOrder, oBrw4:oCol("OudBruto"):nCreationOrder )
:SetGroupHeader( "Maveco", oBrw4:oCol("Prijs_1"):nCreationOrder, oBrw4:oCol("Marge"):nCreationOrder )
Is there a setting that ToExcel is not showing them ? I'm not sure of the options for nGroupBy values...
result of excel...
Id BrandId Benaming Webshop Maveco Brand (
1042PB LB_1042PB TROUSER 1042PB GREY 44
1043PB LB_1043PB TROUSER 1043PB WHITE 44
1052PB LB_1052PB TROUSER 1052PB GREY 44
1053PB LB_1053PB SHORTS 1053PB KHAKI 44