Excel and screenshot library

<< Click to Display Table of Contents >>

Navigation:  Project > Scripts > ST language > Embedded functions >

Excel and screenshot library

Previous pageReturn to chapter overviewNext page

saverecipeexcelreport(Input1, Input2, Input3, Input4) - used to save recipe report in Excel format bind to row. Input2 is an input that contains name of the recipe. Input1 is number of the row (starting from 1). Input3 contains file name of the report. Input4 contains title name. Output = true if recipe row is saved in Excel format. Report is saved in the folder you setup in Project properties->Report folder.

 

Example:

saverecipeexcelreport(1,”RecExcel","streport","Title");

 


excelopenworkbook(Input1) - used to open excel workbook. Input1 contains name of the Excel file. Excel file is in the folder you setup in Project properties->Report folder.

 

Example:

excelopenworkbook(”reportfilename");

 


excelcreateworkbook() - this function create workbook for Excel file;

 


excelsaveworkbook(Input1) - used to save workbook in the Excel with name in Input1. Report is saved in the folder you setup in Project properties->Report folder.

 

Example:

excelsaveworkbook(”filename”);

 


excelcreatesheet(Input1) - create sheet in the workbook of Excel file with name in Input1.

 

Example:

excelcreatesheet(”sheetname”);

 


excelsetcolumnwidth(Input1, Input2, Input3) - set column width with name of the sheet in Input1, number of the column in Input2 and width in Input3.

 

Example:

excelsetcolumnwidth(”sheetname”, 0, 5000);

 


excelcreatestyle(Input1, Input2, Input3, Input4, Input5) - set cell style with name of the style in Input1, horizontal type in Input2 (can be “CENTER”, “LEFT”, “RIGHT”), vertical type in Input3 (can be “CENTER”, “TOP”, “BOTTOM”), font size in Input4 and bold or not in Input5.

 

Example:

excelcreatestyle(”stylename”,"CENTER", "CENTER", 14, false);

 


excelcreatecolorstyle(Input1, Input2, Input3, Input4, Input5, Input6) - set cell style with name of the style in Input1, horizontal type in Input2 (can be “CENTER”, “LEFT”, “RIGHT”), vertical type in Input3 (can be “CENTER”, “TOP”, “BOTTOM”), font size in Input4, bold or not in Input5 and color of the background in Input6 (can be “GREY”, “GREEN”, “RED”, “BLUE”, “YELLOW”).

 

Example:

excelcreatecolorstyle(”stylename”,"CENTER", "CENTER", 14, false,”GREY”);

 


excelcreatecell(Input1, Input2, Input3, Input4, Input5) - create cell with name of the sheet in Input1, number of the row in Input2 and position of the cell in Input3, style name in Input4 and text of the cell in Input5.

 

Example:

excelcreatecell(”sheetname”, 0, 0, ”stylename”,”Text”);

 


excelreadcell(Input1, Input2, Input3) - read cell from the sheet with name in Input1, number of the row in Input2 and position of the cell in Input3.

 

Example:

String cellvalue = excelreadcel(”sheetname”, 0, 0);

 


excelcreatenumbercell(Input1, Input2, Input3, Input4, Input5, Input6) - create cell with name of the sheet in Input1, number of the row in Input2 and position of the cell in Input3, style name in Input4, numeric value in Input5 and decimal position for numeric value in Input6.

 

Example:

excelcreatenumbercell(”sheetname”, 0, 0, ”stylename”,Tags.Value, 2);

 


excelmergecells(Input1, Input2, Input3, Input4, Input5) - merge cells with name of the sheet in Input1, start row in Input2 and end row in Input3, start column in Input4 and end column in Input5.

 

Example:

excelmergecells(”sheetname”,0,1,0,1);

 


makescreenshot(Input1) - used to save screenshot with name in Input1. Screenshot is saved in the folder you setup in Project properties->Report folder.

 

 

Example:

makescreenshot(”filename”);