def guiXbrlLoaded(cntlr, modelXbrl, attach, *args, **kwargs):
    if (cntlr.hasGui and getattr(modelXbrl, 'loadedFromExcel', False)):
        from tkinter.filedialog import askdirectory
        outputDtsDir = askdirectory(parent=cntlr.parent, initialdir=cntlr.config.setdefault('outputDtsDir', '.'), title='Please select a directory for output DTS Contents')
        cntlr.config['outputDtsDir'] = outputDtsDir
        cntlr.saveConfig()
        if outputDtsDir:
            saveDts(cntlr, modelXbrl, outputDtsDir)
        cntlr.showStatus(_('Excel loading completed'), 3500)
def guiXbrlLoaded(cntlr, modelXbrl, attach, *args, **kwargs):
    if (cntlr.hasGui and getattr(modelXbrl, 'loadedFromExcel', False)):
        from tkinter.filedialog import askdirectory
        outputDtsDir = askdirectory(parent=cntlr.parent, initialdir=cntlr.config.setdefault('outputDtsDir', '.'), title='Please select a directory for output DTS Contents')
        cntlr.config['outputDtsDir'] = outputDtsDir
        cntlr.saveConfig()
        if outputDtsDir:
            saveDts(cntlr, modelXbrl, outputDtsDir)
        cntlr.showStatus(_('Excel loading completed'), 3500)