How can I set header footer for excel using ARIS script? We get the output of some ARIS scripts in Excel. It will be better if we can set header footer for the same.
10 Replies
-
You have to use BeginHeader\BeginFooter and dependent methods in a script code.
-
Thanks for your response Konstantin. I tried
BeginHeader\BeginFooter, OutputLn methods. It did not work for me. Could you please tell me what are the methods we can use inside BeginHeader\BeginFooter. -
Hello Kalimuthu,
in the script help you can find the following:
Starts the report header All subsequent outputs up to the EndHeader command are written in the header.
Example:
var File = Context.createOutputObject();
var image = Context.createPicture("picture.jpg");
File.BeginHeader(); File.BeginTable(100,Constants.C_BLACK,Constants.C_WHITE,Constants.FMT_LEFT,0,true);
File.TableRow();
File.TableCell(" ",20,"Arial",10,Constants.C_BLACK,Constants.C_WHITE,0,Constants.FMT_CENTER,0,C_RED,Constants.BORDER_THIN); File.OutGraphic(image,100,15,15);File.TableCell(" This is a test report ",60,"Arial",10,Constants.C_BLACK,Constants.C_WHITE,0,Constants.FMT_CENTER,0,Constants.C_RED,Constants.BORDER_THIN);
File.TableCell(" ",20,"Arial",10,Constants.C_BLACK,Constants.C_WHITE,0,Constants.FMT_CENTER,0,Constants.C_RED,Constants.BORDER_THIN);
File.EndTable("TESTSHEET1",100, "Arial",10,Constants.C_BLACK,Constants.C_BLACK,0,Constants.FMT_LEFT,0);
File.EndHeader();
Description: Writes a header with graphic in the report. The graphic is loaded from the default path.
Hope this helps!
Best Regards, Volker
-
Thanks for your quick response Volker... I tried it. But still it doesn't work for me. It displays blank.
-
Hi Kalimuthu,
the reason might be that you are using text only commands, instead of excel commands.
Can you please check if you get something if you change the output type to PDF?
Regards, Volker
-
I tried it in PDF. It wasn't working in the first attempt. I removed the image and gave only text as Header. Then it worked
-
I want to include Header/footer in Excel. If we go to Excel->View->Header/footer we can have customized header/footer. After setting it, if we go to File->print preview it will have header/footer on the page. I have shown the sample page here. I have marked (rounded in Red) header / footer for this page.
-
Hi Kalimuthu,
it looks to me that perhaps header and footer in Excel are not yet supported. The command set above works,with some smaller changes in PDF, but in Excel it is always blank. Also changing to Output was not much better.
If someone knows how to solve this, please let us know.
Thanks in advance
Volker -
Hi,
Did someone find a solution to insert header and footer text in Excel reports ?
Thanks in advance
Patrick
-