I have had 2 errors when exporting to excel from an xbrowse.
1. Argument error: ALLTRIM which was called from xbrowse.prg => TXBRWCOLUMN:CLPTEXT(11406)
Original Code:-
Code: Select all
if ::bEditValue == nil
if ::bStrData == nil
RetVal := ""
else
RetVal := AllTrim(Eval( ::bStrData ))
endif
Code: Select all
if ::bEditValue == nil
if ::bStrData == nil
RetVal := ""
else
RetVal := Eval( ::bStrData )
IF Valtype(RetVal) == "N"
RetVal := AllTrim(STR(RetVal) )
ELSEIF Valtype(RetVal) == "C"
RetVal := AllTrim(RetVal)
ENDIF
endif
Original Code:-
Code: Select all
if ::nDataType != DATATYPE_ARRAY
DO CASE
CASE cType == 'N'
cFormat := Clp2xlNumPic( oCol:cEditPicture )
oSheet:Columns( nCol ):NumberFormat := cFormat
oSheet:Columns( nCol ):HorizontalAlignment := - 4152 //xlRight
CASE cType == 'D'
if lxlEnglish
if ValType( oCol:cEditPicture ) == 'C' .and. Left( oCol:cEditPicture, 1 ) != '@'
oSheet:Columns( nCol ):NumberFormat := Lower( oCol:cEditPicture )
else
oSheet:Columns( nCol ):NumberFormat := Lower( Set( _SET_DATEFORMAT ) )
endif
oSheet:Columns( nCol ):HorizontalAlignment := - 4152 //xlRight
endif
CASE cType $ "LPFM"
// leave as general format
OTHERWISE
if ::nDataType != DATATYPE_ARRAY
oSheet:Columns( nCol ):NumberFormat := "@"
if ! Empty( oCol:nDataStrAlign )
oSheet:Columns( nCol ):HorizontalAlignment := If( oCol:nDataStrAlign == AL_CENTER, -4108, -4152 )
endif
endif
ENDCASE
endif
Code: Select all
if ::nDataType != DATATYPE_ARRAY
IF!EMPTY(cType)
DO CASE
CASE cType == 'N'
cFormat := Clp2xlNumPic( oCol:cEditPicture )
oSheet:Columns( nCol ):NumberFormat := cFormat
oSheet:Columns( nCol ):HorizontalAlignment := - 4152 //xlRight
CASE cType == 'D'
if lxlEnglish
if ValType( oCol:cEditPicture ) == 'C' .and. Left( oCol:cEditPicture, 1 ) != '@'
oSheet:Columns( nCol ):NumberFormat := Lower( oCol:cEditPicture )
else
oSheet:Columns( nCol ):NumberFormat := Lower( Set( _SET_DATEFORMAT ) )
endif
oSheet:Columns( nCol ):HorizontalAlignment := - 4152 //xlRight
endif
CASE cType $ "LPFM"
// leave as general format
OTHERWISE
if ::nDataType != DATATYPE_ARRAY
oSheet:Columns( nCol ):NumberFormat := "@"
if ! Empty( oCol:nDataStrAlign )
oSheet:Columns( nCol ):HorizontalAlignment := If( oCol:nDataStrAlign == AL_CENTER, -4108, -4152 )
endif
endif
ENDCASE
ENDIF
endif
Thanks
Gary