FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse to excel problem (numeric field with decimal)
Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM
xbrowse to excel problem (numeric field with decimal)
Posted: Thu Dec 11, 2014 03:59 PM

I have a problem using Xbrowse class.

When i got an EXCEL files from DBF with numeric field AND decimal.

The problem is that in the excel files i got "." instead of "," and then i cannot use thi cell of excel for calculation.

I tried to modify parametr of xbrowse class, but i am not able to resolve the problem.

Please SEE the below minimal example:

I am using FWH80

Tks
Romeo/Zingoni


*
* testxbr.prg
*

include "FiveWin.Ch"

include "XBrowse.Ch"

*
function main()

local aDbf,oWnd, oBrw, oCol, oBrush, cAlias := cGetNewAlias( "CUST" )

aDbf := {}
AADD(aDbf,{ "NOME", "C", 25, 0 })
AADD(aDbf,{ "SALARIO1", "N", 9,0})
AADD(aDbf,{ "SALARIO2", "N", 9,2})
DBCREATE("CUSTO", aDbf)
USE CUSTO NEW ALIAS (cAlias)
APPE BLANK
REPLACE nome with "Rossi Mario",salario1 with 1234,salario2 with 1234.56

DEFINE dialog ownd TITLE "Test" FROM 0,0 TO 24,80

@ 0,0 XBROWSE oBrw OF ownd ALIAS cAlias ;
SIZE 200,100 ;
FOOTERS FASTEDIT LINES CELL

oBrw:bClrRowFocus := oBrw:bClrSelFocus

oBrw:CreateFromCode()
oWnd:oClient := oBrw

@9 ,1 button "To Excel" ACTION oBrw:ToExcel() of ownd

ACTIVATE dialog oWnd ON INIT oBrw:SetFocus() CENTERED

return nil
*
*** fine esempio
*

Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM
Re: xbrowse to excel problem (numeric field with decimal)
Posted: Tue Dec 16, 2014 09:54 AM

Any help ????????

Tks

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse to excel problem (numeric field with decimal)
Posted: Sat Dec 27, 2014 07:38 PM

Please try to set:

oBrw:lExcelCellWise := .t.

Can u please let us know if the problem is solved with this setting?

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion