IBI WebFOCUS - Renaming Excel report file name generated
Dear friends,
While creating the Excel report, the name of the excel file comes randomly with normal scenario if we give "PCHOLD FORMAT EXL07". I recently came to a scenario where the business user wanted the excel report name to come as per the report name. Please note that user wanted to rename Excel file name not the tab names in the file.
In general we right our code as below:
TABLE FILE CAR
SUM
CAR.BODY.SEATS
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
Output:
However if we need to name the Excel file, we can use below code:
TABLE FILE CAR
SUM
CAR.BODY.SEATS
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD AS MYREPORT FORMAT EXL07
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
Output:
It is not a big thing but sometimes if we start exploring for such requirement, it might take lots of time. I hope it will be helpful for you. Please let me know if there is any questions.
Please share your thoughts/ feedback's. Happy coding in WebFOCUS!!!!
While creating the Excel report, the name of the excel file comes randomly with normal scenario if we give "PCHOLD FORMAT EXL07". I recently came to a scenario where the business user wanted the excel report name to come as per the report name. Please note that user wanted to rename Excel file name not the tab names in the file.
In general we right our code as below:
TABLE FILE CAR
SUM
CAR.BODY.SEATS
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
Output:
However if we need to name the Excel file, we can use below code:
TABLE FILE CAR
SUM
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD AS MYREPORT FORMAT EXL07
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
Output:
It is not a big thing but sometimes if we start exploring for such requirement, it might take lots of time. I hope it will be helpful for you. Please let me know if there is any questions.
Please share your thoughts/ feedback's. Happy coding in WebFOCUS!!!!
Comments
Post a Comment