Hi Community,
Can someone give me a sample on how to fill the Excel import template to import an excel to ARIS for BPMN models.
Thanks,
Subash
Hi Subash,
Were you ever able to find a sample or additional information regarding how to fill the Excel import template to create objects in ARIS? I am also trying to figure out how to use this functionality but I haven't been successful with finding anything useful to guide me with this task.
Regards,
Ed
i've got something working just recently,
you can look at this sample code:
var locale = Context.getSelectedLanguage();
var models = ArisData.getSelectedModels([Constants.MT_EERM])[0];
var db = ArisData.getActiveDatabase();
var template = Context.getFile("Template.xls",Constants.LOCATION_COMMON_FILES);
var xlsBook = Context.createExcelWorkbook(models.Name(locale)+".xls",template);
var setting = xlsBook.getSheets()[0];
var row=1;
var oEntityOccs = models.ObjOccListFilter(Constants.OT_ENT_TYPE);
for(var m = 0; m < oEntityOccs.length; m++) {
var pEntityName = oEntityOccs[m].ObjDef().Name(locale);
var oCxnOccs = oEntityOccs[m].CxnOccList();
for (var n = 0; n < oCxnOccs.length; n++)
{
var oSourceObjOcc = oCxnOccs[n].SourceObjOcc();
setting.cell(row, 1).setCellValue(pEntityName);
setting.cell(row, 2).setCellValue(oSourceObjOcc.ObjDef().Name(locale));
setting.cell(row, 3).setCellValue(oSourceObjOcc.SymbolName());
setting.cell(row, 5).setCellValue(oSourceObjOcc.ObjDef().Attribute(Constants.AT_LEN_1,locale).getValue());
setting.cell(row, 6).setCellValue(oSourceObjOcc.ObjDef().Attribute(Constants.AT_DATA_TYPE,locale).getValue());
setting.cell(row, 7).setCellValue(oSourceObjOcc.ObjDef().Attribute(Constants.AT_DESC,locale).getValue());
row = row + 1;
}
}
xlsBook.write();