Page 1 of 1

fwh 24.02 saving xls from xbrowse error. (SOLVED)

Posted: Mon Sep 23, 2024 4:17 pm
by Horizon
Hi,

I use below codes in the begining of my application.

Code: Select all | Expand

REQUEST XLSXLIB
UseXLSXLIB(  .T.  )
 
When I click on the Excel button from Xbrowse, sometimes this error occurs.

Code: Select all | Expand

Application
===========
   Path and name: C:\PrgW\Icra\IcraW.exe (32 bits)
   Size: ********* bytes
   Compiler version: Harbour 3.2.0dev (r2405130039)
   FiveWin  version: FWH 23.10
   C compiler version: Microsoft Visual C 19.32.31329 (32-bit)
   Windows 10 64 Bits, version: 6.2, Build 9200 

   Time from start: 0 hours 1 mins 57 secs 
   Error occurred at: 23/09/2024, 19:02:41
   Error description: Error BASE/1100  Argument error: TRIM
   Args:
     [   1] = N   85699

Stack Calls
===========
   Called from: .\source\function\DRXL.PRG => TRIM( 0 )
   Called from: .\source\function\FWXLSXLB.PRG => (b)TWORKSHEET_SETARRAYDATA( 521 )
   Called from: .\source\function\DRXL.PRG => AEVAL( 0 )
   Called from: .\source\function\FWXLSXLB.PRG => TWORKSHEET:SETARRAYDATA( 528 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:TOXLSX( 10841 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:TOEXCEL( 10927 )
   Called from: .\source\function\XBROWSER.PRG => (b)XBROWSE( 182 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 797 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 1084 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1851 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2139 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3651 )
   Called from: .\source\classes\DIALOG.PRG => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 309 )
   Called from: .\source\function\XBROWSER.PRG => XBROWSE( 294 )
What should I do?

Thanks.

Re: fwh 24.02 saving xls from xbrowse error.

Posted: Wed Sep 25, 2024 7:04 am
by Horizon
up

Re: fwh 24.02 saving xls from xbrowse error.

Posted: Wed Sep 25, 2024 12:47 pm
by nageswaragunupudi
Please try making this modification in the program
\fwh\source\function\fwxlsxlb.prg

Please locate this line (at 521 or 522)

Code: Select all | Expand

aRow[ n ] := Trim( IfNil( aRow[ n ], "" ) )
Please replace it with

Code: Select all | Expand

aRow[ n ] := If( HB_ISSTRING( aRow[ 3 ] ), Trim( aRow[ 3 ] ), IfNil( aRow[ n ], "" ) )
and try.

Re: fwh 24.02 saving xls from xbrowse error.

Posted: Thu Sep 26, 2024 12:29 pm
by Horizon
Hi Mr. Rao,

It is solved. Thank you very much.

Re: fwh 24.02 saving xls from xbrowse error. (SOLVED)

Posted: Thu Sep 26, 2024 5:34 pm
by Horizon
Hi Mr. Rao,

After changing the value 3 in the square brackets to n, the current state works..

Code: Select all | Expand

aRow[ n ] := If( HB_ISSTRING( aRow[ n ] ), Trim( aRow[ n ] ), IfNil( aRow[ n ], "" ) )