I remarked that when I use xbrowse Toexcel() in excel the numer are always wrong .
I try to use xbrNumFormat() without success .
It's a xbrowse bug ?
Fwh 9.11 November
This is test program by another Maurizio
- Code: Select all Expand view
#include 'fivewin.ch'
#include 'xbrowse.ch'
static oFont, ovFont,oWnd,oBrw
function main()
Local aDbf := {}
Local nX := 1
Local cPic := "@ZE 999999.9999"
ferase("NUMBER.DBF")
AADD (aDbf, {"NUM_1" ,"N", 12, 3 })
AADD (aDbf, {"NUM_2" ,"N", 12, 3 })
AADD (aDbf, {"NUM_3" ,"N", 12, 3 })
dbcreate("NUMBER", aDbf)
xbrNumFormat( "E", .t. ) // "E" for European, "A" for American and others
// .t. for showing thousand separators
use number
FOR nX := 1 to 10
dbappend()
field->NUM_1 := nX * 0.1
field->NUM_2 := nX * 10
field->NUM_3 := nX * 100
NEXT
dbgotop()
DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-12
DEFINE FONT oVfont NAME 'TAHOMA' SIZE 0,-12 NESCAPEMENT 900
DEFINE WINDOW oWnd MENU MainMenu()
oWnd:SetFont( oFont )
@ 0,0 XBROWSE oBrw ;
COLUMNS 'NUM_1', 'NUM_2', 'NUM_3' ;
PICTURE cPic,cPic,cPic ;
OF oWnd ;
ALIAS 'NUMBER' ;
LINES CELL
oBrw:CreateFromCode()
oWnd:oClient := oBrw
SET MESSAGE OF oWnd TO "XBrowse " 2007
ACTIVATE WINDOW oWnd
return nil
//===========================
Static Function MAinMenu()
Local oPop
MENU oPop 2007
MENUITEM "Excel" ACTION oBrw:ToExcel()
MENUITEM "Exit" ACTION oWnd:end()
ENDMENU
Return oPop
Regards Maurizio Menabue