ListOfForms in AOT to Excel x++ :
static void BIT_Addit_ListOfFormsOK(Args _args)
{
UtilElements localEelmet;
UtilEntryLevel LayerName =
UtilEntryLevel::usr;
TreeNode treeNode;
SysExcelApplication excel;
SysExcelWorkbooks
workbooks;
SysExcelWorkbook
workbook;
SysExcelWorksheets
worksheets;
SysExcelWorksheet
worksheet;
SysExcelCells
cells;
SysExcelCell cell;
int row;
excel =
SysExcelApplication::construct();
workbooks =
excel.workbooks();
workbook =
workbooks.add();
worksheets =
workbook.worksheets();
worksheet =
worksheets.itemFromNum(1);
cells =
worksheet.cells();
cells.range('A:A').numberFormat('@');
while select
localEelmet
where
localEelmet.recordType == UtilElementType::Form
&&
localEelmet.utilLevel == LayerName
//remove this line if you want all layers
{
treeNode =
xUtilElements::getNodeInTree(xUtilElements::parentElement(localEelmet));
//
print(strFmt("Name: %1",localEelmet.name));
row++;
cell =
cells.item(row+1, 2);
cell.value(localEelmet.name);
}
excel.visible(true);
}
0 comments:
Post a Comment