Page 1 of 1

Problem in Export xBrowse to Excel ?

Posted: Wed Mar 19, 2008 6:56 pm
by ukoenig
Hello,

There is a Error in Sample Testxbr3

Windows =>
RDD =>
All Cols

The Field SALARY is counted in the Footer.
When you choose EXCEL there is a Error :

Application
===========
Path and name: D:\FWH\samples\testxbr3.exe (32 bits)
Size: 1,840,128 bytes
Time from start: 0 hours 0 mins 9 secs
Error occurred at: 19-03-2008, 18:43:18
Error description: Error 21422668:CELLS/0 S_OK: _FORMULA
Args:
[ 1] = C =SUBTOTAL(9,J2:J501)

Stack Calls
===========
Called from: win32ole.prg => TOLEAUTO:_FORMULA(0)
Called from: XBROWSE.PRG => TXBROWSE:TOEXCEL(0)
Called from: testxbr3.prg => (b)BTNBAR(578)
Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)
Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: BTNBMP.PRG => TBTNBMP:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: testxbr3.prg => MAIN(43)

Regards

Uwe

Posted: Thu Mar 20, 2008 12:37 am
by Antonio Linares
Uwe,

You have to change this code in Class TXBrowse:

"=SUBTOTAL(9,"

into the right excel keyword for your country language. Also the "," may change. For example, for Spanish Excel this is required in order to work:

"=SUBTOTALES(9;"

We appreciate if Excel users from other countries report here the right formula name for them, thanks!

Posted: Thu Mar 20, 2008 1:15 am
by nageswaragunupudi
In Italian it is SUBTOTALE(9
I do not know if comma should follow or semi-colon should follow 9.

If language is creating problems, better we comment out all lines containing :lTotal := .t. in the sample and try export to excel. Export will not put the totals but will export data without errors.