Linares,
Is there any parameter to reset all the numeric formats xBrowse for Brazilian (999,999.99) standard?
If so this parameter also changes the format of the exported to Excel numbers?
#include 'fivewin.ch'
#include 'xbrowse.ch'
function Main()
local oWnd, oBar, oBrw, nTotal:=0
/*
A. American format: "999,999,999.99"
E. European format: "999.999.999,99"
I. Indian format: "99,99,999.99"
*/
FwNumFormat( 'E', .T. ) // European Format
DBCREATE("TESTXLS",{{"DESC ","C",010,000},;
{"VAL1 ","N",010,001},;
{"VAL2 ","N",010,002},;
{"VAL3 ","N",010,003},;
{"VAL4 ","N",010,004},;
{"VAL5 ","N",010,005}})
USE TESTXLS NEW ALIAS TESTXLS
FOR nTotal=1 To 20
APPEND BLANK
REPL DESC WITH "Linha "+STRZERO(nTotal,2)
REPL VAL1 WITH 99999 * nTotal / 777
REPL VAL2 WITH 99999 * nTotal / 777
REPL VAL3 WITH 99999 * nTotal / 777
REPL VAL4 WITH 99999 * nTotal / 777
REPL VAL5 WITH 99999 * nTotal / 777
NEXT
DEFINE WINDOW ownd
DEFINE BUTTONBAR oBar OF oWnd SIZE 80,32 2007
DEFINE BUTTON OF oBar PROMPT 'Excel' ;
ACTION MsgMeter( { |oMeter, oText, oDlg, lEnd | ;
Export2Excel( oBrw, oMeter, oText, oDlg, @lEnd ) } )
DEFINE BUTTON OF oBar PROMPT 'Quit' ACTION WndMain():End()
SET MESSAGE OF oWnd TO '' 2007
@ 0,0 XBROWSE oBrw OF oWnd ALIAS 'TESTXLS' AUTOCOLS CELL LINES
// Realmente nao funciona quando exporto para o Broffice/Excel
oBrw:aCols[2]:bFooter = {|| TRANSFORM(Field->VAL1, "@E 9.999.999,99") }
oBrw:aCols[3]:bFooter = {|| TRANSFORM(Field->VAL2, "@E 9.999.999,99") }
oBrw:aCols[4]:bFooter = {|| TRANSFORM(Field->VAL3, "@E 9.999.999,99") }
oBrw:aCols[5]:bFooter = {|| TRANSFORM(Field->VAL4, "@E 9.999.999,99") }
oBrw:aCols[6]:bFooter = {|| TRANSFORM(Field->VAL5, "@E 9.999.999,99") }
oBrw:MakeTotals()
oBrw:refresh()
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd MAXIMIZED
CLOSE DATA
return nil
static function Export2Excel( oBrw, oMeter, oText, oDlg, lEnd )
oBrw:ToExcel( { |n,t| oMeter:nTotal := t, ;
oMeter:Set( n ), ;
oText:SetText( Str(n) + '/' + Str(t) ), ;
oDlg:Update(), .t. } )
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 11 guests