//Debug print "Module output!\n" Item i for i in f do { currentModule = read(fullName(i), false, true) //the 2nd parameter won't open the module in the GUI (false) or will it open (true) //currentModule = read(fullName(i), true, true) //the 2nd parameter won't open the module in the GUI (false) or will it open (true) //Debug print "doExcel: " name(currentModule) "\n" Object o Column c string s int doMain int row = 0 int col print "isExcelAlreadyStarted: " isExcelAlreadyStarted "\n" if (!excelInit(currentModule)) { delete args //delete excelTrigger return } //Sets the used view to the view which was chosen in the GUI //myMainView = get mainView /*bool viewWasFound = null //Debug print "Begin view-loop \n" string v for v in views(currentModule) do { if(myMainView == v) { setDefaultViewForModule(currentModule, myMainView) //The view could only be set in the module, if the module is already opened in the GUI viewWasFound = true //Debug print "viewWasFound: " viewWasFound "\n" print "myMainView: " myMainView "\n" break } else { setDefaultViewForModule(currentModule, getDefaultViewForModule(currentModule)) //The view could only be set in the module, if the module is already opened in the GUI viewWasFound = false //Debug print "viewWasFound: " viewWasFound "\n" } }*/ //Debug //print "viewWasFound: " viewWasFound "\n" doMain = get mainChoice includeColumnTitles = get titleToggle preserveRichTextFormatting = get preserveRichTextFormattingToggle if (includeColumnTitles) { col = 0 row++ //for c in m do for c in currentModule do { if ((main c) && (doMain == mainIgnore)) continue col++ s = title c if (s != (NLS_(""))) { setCell(row, col, s, null, NO_HEADING) } } } //initProgress(excelBox, m) initProgress(excelBox, currentModule) initNotDisplayedOpenModules() //Debug //print "myMainView: " myMainView "\n" //Check if view is in current module available myMainView = get mainView if(checkViewAvailability(myMainView, currentModule)) { //for o in m do for o in currentModule do { if (DisplayMemoryWarning()) { break } col = 0 row ++ int rowExcludingTitle = 0 if (progressCancelled) break if (includeColumnTitles) { rowExcludingTitle = row - 1 stepProgress rowExcludingTitle } else { stepProgress row } Buffer rtfStringBuffer, plainTextBuffer //for c in m do for c in currentModule do { rtfStringBuffer = create plainTextBuffer = create col++ int headingInfo = NO_HEADING if (main c) { //Check if the object is read locked if (doMain == mainIgnore || !canRead o) { col-- continue } string attributeName = getDisplayedAttributeName(o) if(null attributeName) { if (doMain == mainHeading) { if(preserveRichTextFormatting) { rtfStringBuffer = richText o.AHeading } fullAttributeValue_(o,AHeading,false, plainTextBuffer, false) headingInfo = HEADING_ONLY } if (doMain == mainShort) { if(preserveRichTextFormatting) { rtfStringBuffer = richText o.AShortText } plainTextBuffer = o.AShortText } if (doMain == mainLong) { if(preserveRichTextFormatting) { rtfStringBuffer = richText o.ALongText } fullAttributeValue_(o,ALongText,false, plainTextBuffer, false) } if (doMain == mainHeadingLong) { if(preserveRichTextFormatting) { headingLong(o, true, rtfStringBuffer, headingInfo) } headingLong(o, false, plainTextBuffer, headingInfo) } } // if(null attributeName) else { //Map the main column attribute to the Object text amd/or //Object heading and text if (doMain == mainLong || doMain == mainHeadingLong) { if(!hasCopyableTableAttribute(o, attributeName)) { continue } // check that the attribute is a string or text attribute AttrDef ad = find(module o, attributeName) if(preserveRichTextFormatting && !null ad && (ad.typeName == (NLS_("String")) || ad.typeName == (NLS_("Text")))) { rtfStringBuffer = richText o.attributeName } plainTextBuffer = o.attributeName if(attributeName == (NLS_("Object Heading"))) { headingInfo = HEADING_ONLY } } } // if(!null attributeName) } // if (main c) else { string attrDisplayedInCol = attrName c if(attrDisplayedInCol != (NLS_(""))) { // check that the attribute is a string or text attribute AttrDef ad = find(module o, attrDisplayedInCol) if(preserveRichTextFormatting && !null ad && (ad.typeName == (NLS_("String")) || ad.typeName == (NLS_("Text")))) { rtfStringBuffer = richText(c, o) } } if (null dxl(c)) { plainTextBuffer = tempStringOf(probeAttrBuffUSShortDate_(o, attrDisplayedInCol)) } else { plainTextBuffer = text(c,o) if(preserveRichTextFormatting && attrDisplayedInCol == (NLS_(""))) { rtfStringBuffer = richText(c, o) } } if(attrDisplayedInCol == (NLS_("Object Heading"))) { headingInfo = HEADING_ONLY } } // if (!main c) if (length(plainTextBuffer) > 0) { setCell(row, col, tempStringOf plainTextBuffer, tempStringOf rtfStringBuffer, headingInfo) } delete plainTextBuffer delete rtfStringBuffer } // for c in m } // for o in m } // if(checkViewAvailability) closeNotDisplayedOpenedModules() progressStop closeIfNonNull objCell clear args //delete args //disconnectFromApp objExcel //delete excelTrigger isExcelAlreadyStarted = true } disconnectFromApp objExcel } //Debug print "DD \n"