Modified the method SetPrintToFitHeight
IF INT(tnFitToHeight) >= 0
REPLACE xl_sheets.fittopage WITH IIF(tnFitToHeight>0 OR xl_sheets.fittowidth>0, 1, 0), ;
xl_sheets.fittoheight WITH INT(tnFitToHeight) ;
IN xl_sheets
Modified the method SetPrintToFitWidth
IF INT(tnFitToWidth) >= 0
REPLACE xl_sheets.fittopage WITH IIF(xl_sheets.fittoheight>0 OR tnFitToWidth>0, 1, 0), ;
xl_sheets.fittowidth WITH INT(tnFitToWidth) ;
IN xl_sheets
Modified the WriteSheetXMLS
IF xl_sheets.fittopage > 0
FWRITE(lhFile, '') && If uncommented; sheet will be invalid by Excel
ENDIF
! DO CASE
! CASE xl_sheets.fittowidth > 0 .AND. xl_sheets.fittoheight > 0
Code modified or added to correct the issue.
Modified the method SetPrintToFitHeight IF INT(tnFitToHeight) >= 0 REPLACE xl_sheets.fittopage WITH IIF(tnFitToHeight>0 OR xl_sheets.fittowidth>0, 1, 0), ; xl_sheets.fittoheight WITH INT(tnFitToHeight) ; IN xl_sheets
Modified the method SetPrintToFitWidth IF INT(tnFitToWidth) >= 0 REPLACE xl_sheets.fittopage WITH IIF(xl_sheets.fittoheight>0 OR tnFitToWidth>0, 1, 0), ; xl_sheets.fittowidth WITH INT(tnFitToWidth) ; IN xl_sheets
Modified the WriteSheetXMLS IF xl_sheets.fittopage > 0 FWRITE(lhFile, ' ') && If uncommented; sheet will be invalid by Excel
ENDIF
! DO CASE ! CASE xl_sheets.fittowidth > 0 .AND. xl_sheets.fittoheight > 0
! CASE xl_sheets.fittowidth = 0 .AND. xl_sheets.fittoheight > 0 ! FWRITE(lhFile, ' fitToHeight="' + TRANSFORM(xl_sheets.fittoheight) + '"')
! CASE xl_sheets.fittowidth > 0 .AND. xl_sheets.fittoheight = 0 ! FWRITE(lhFile, ' fitToWidth="' + TRANSFORM(xl_sheets.fittowidth) + '"') ! ! OTHERWISE ! IF xl_sheets.scale != 100 ! FWRITE(lhFile, ' scale="' + TRANSFORM(xl_sheets.scale) + '"') ! ENDIF ! ENDCASE