Fwxlsxlib error xbrowse oBrw:toExcel

Fwxlsxlib error xbrowse oBrw:toExcel

Postby mauri.menabue » Thu Jun 06, 2024 8:35 am

Hi all,

when the oBrw:toExcel function is executed
and the UseXLSXLIB( .T. ) command is active
to use the Fwxlsxlb library this error appears :

Application
===========
Path and name: d:\Zephir\NwCoge\Sigah.exe (32 bits)
Size: ********* bytes
Compiler version: Harbour 3.2.0dev (r2307062207)
FiveWin version: FWH 23.10
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows 10 64 Bits, version: 10.0, Build 22631

Time from start: 0 hours 0 mins 23 secs
Error occurred at: 06/06/2024, 10:13:13
Error description: Error BASE/1075 Parametro errato: >
Args:
[ 1] = U
[ 2] = N 4

Stack Calls
===========
Called from: prog\Fwxlsxlb.prg => (b)TWORKSHEET_SETARRAYDATA( 531 )
Called from: prog\GesEse.prg => AEVAL( 0 )
Called from: prog\Fwxlsxlb.prg => TWORKSHEET:SETARRAYDATA( 531 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:TOXLSX( 10868 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:TOEXCEL( 10954 )
Called from: \servizio\prog\StdGes.prg => GOEXCEL( 9823 )
Called from: \servizio\prog\StdGes.prg => (b)FEXCEL( 9763 )
Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK( 179 )
Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT( 1815 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3648 )
Called from: prog\GesOff.prg => SENDMESSAGE( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND( 502 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1221 )
Called from: .\source\classes\DIALOG.PRG => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 309 )
Called from: \servizio\prog\StdGes.prg => FEXCEL( 9775 )
Called from: \servizio\prog\StdGes.prg => STDGES:GESTIONE( 4155 )
Called from: \servizio\prog\StdGes.prg => (b)STDGES_CREABAR( 2576 )
Called from: .\source\classes\TOOLBAR.PRG => TTOOLBAR:COMMAND( 237 )
Called from: .\source\classes\WINDOW.PRG => TMDICHILD:COMMAND( 1156 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\MDICHILD.PRG => TMDICHILD:HANDLEEVENT( 343 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3648 )
Called from: .\source\classes\WINDOW.PRG => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1112 )
Called from: prog\Main.prg => MAIN( 6467 )

to remedy the error I made this change, but I would like Master Rao's opinion

the modified file is d:\Fwh\source\function\Fwxlsxlb.prg

Code: Select all  Expand view

//----------------------------------------------------------------------------//

METHOD SetArrayData( aData, aStruct, aGroup ) CLASS TWorkSheet

   local nRow, aSize
   local o,n,nLen

   if aStruct == nil .or. !HB_ISARRAY( aStruct[ 1 ] )
      o  := TArrayData():New( aData, aStruct )
      aStruct  := o:aStruct
   endif
   aStruct  := AClone( aStruct )
   aSize    := Array( Len( aStruct ) )
   AFill( aSize, 0 )
   AEval( aData, <|aRow|
      for n := 1 to Len( aStruct )
         if aStruct[ n, 2 ] == "C"
            aRow[ n ] := Trim( IfNil( aRow[ n ], "" ) )
            if ( nLen := Len( aRow[ n ] ) ) > aSize[ n ]
               aSize[ n ] := nLen
            endif
         endif
      next
      return nil
      > )
   *- AEval( aStruct, { |a,i| If( a[ 2 ] == "C" .and. a[ 3 ] > aSize[ i ], ;   <--------------------------------------------- Old Line 530
   *-         a[ 3 ] := aSize[ i ], ) } )                                                       <--------------------------------------------- old Line 531
     
   AEval( aStruct, { |a,i| if(valtype(a[ 3 ]) <> "N", a[3] := 0,  ), If( a[ 2 ] == "C" .and. a[ 3 ] > aSize[ i ], ;  // <--------- New line
              a[ 3 ] := aSize[ i ], ) } )                                                                                                           // <--------- New line

   nRow  := ::SetStruct( aStruct,, aGroup )
   AEval( aData, { |a,i| nRow := ::SayRow( nRow, a ) } )

return nRow
 


TIA
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Fwxlsxlib error xbrowse oBrw:toExcel

Postby nageswaragunupudi » Thu Jun 06, 2024 3:31 pm

we'll check and get back
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 74 guests

cron