打开pdm,然后按快捷键:ctrl + shift +x

输入以下脚本,点击Run

将会按照 以下形式生成Excel:

表名 表中文名 表备注 字段ID 字段名 字段中文名 字段类型 字段备注
'******************************************************************************
'* File:     pdm2excel.vbs
'* Purpose:  分目录递归,查找当前PDM下所有表,并导出Excel
'* Title:
'* Category:
'* Version:  1.0
'* Author:  huhaicool@sina.com
'******************************************************************************
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
' get the current active model
Dim mdl ' the current model
Set mdl = ActiveModel
Dim EXCEL,sheet,rowsNum
rowsNum = 1If (mdl Is Nothing) ThenMsgBox "There is no Active Model"
ElseSetExcelListObjects(mdl)
End If
'-----------------------------------------------------------------------------
' Sub procedure to scan current package and print information on objects from current package
' and call again the same sub procedure on all children pacakge
' of the current package
'-----------------------------------------------------------------------------
Private Sub ListObjects(fldr)output "Scanning " & fldr.codeDim obj ' running objectFor Each obj In fldr.children' Calling sub procedure to print out information on the objectDescribeObject objNext' go into the sub-packagesDim f ' running folderFor Each f In fldr.Packages'calling sub procedure to scan children packageListObjects fNext
End Sub
'-----------------------------------------------------------------------------
' Sub procedure to print information on current object in output
'-----------------------------------------------------------------------------
Private Sub DescribeObject(CurrentObject)if not CurrentObject.Iskindof(cls_NamedObject) then exit subif CurrentObject.Iskindof(cls_Table) then ExportTable CurrentObject, sheetelseoutput "Found "+CurrentObject.ClassName+" """+CurrentObject.Name+""", Created by "+CurrentObject.Creator+" On "+Cstr(CurrentObject.CreationDate)   End if
End SubSub SetExcel()Set EXCEL= CreateObject("Excel.Application")' Make Excel visible through the Application object.EXCEL.Visible = TrueEXCEL.workbooks.add(-4167)'添加工作表EXCEL.workbooks(1).sheets(1).name ="pdm"set sheet = EXCEL.workbooks(1).sheets("pdm")' Place some text in the first Row of the sheet.sheet.Cells(rowsNum, 1).Value = "表名"sheet.Cells(rowsNum, 2).Value = "表中文名"sheet.Cells(rowsNum, 3).Value = "表备注"sheet.Cells(rowsNum, 4).Value = "字段ID"sheet.Cells(rowsNum, 5).Value = "字段名"sheet.Cells(rowsNum, 6).Value = "字段中文名"sheet.Cells(rowsNum, 7).Value = "字段类型"sheet.Cells(rowsNum, 8).Value = "字段备注"
End SubSub ExportTable(tab, sheet)Dim col ' running columnDim colsNumcolsNum = 0for each col in tab.columnscolsNum = colsNum + 1rowsNum = rowsNum + 1sheet.Cells(rowsNum, 1).Value = tab.codesheet.Cells(rowsNum, 2).Value = tab.namesheet.Cells(rowsNum, 3).Value = tab.commentsheet.Cells(rowsNum, 4).Value = colsNumsheet.Cells(rowsNum, 5).Value = col.codesheet.Cells(rowsNum, 6).Value = col.namesheet.Cells(rowsNum, 7).Value = col.datatypesheet.Cells(rowsNum, 8).Value = col.commentnextoutput "Exported table: "+ +tab.Code+"("+tab.Name+")"
End Sub 

PowerDesigner导出所有表到Excel(同一表格)相关推荐

  1. oracle导出一个表数据库,excel怎么导出多个表格数据库数据-一个excel表格中有多个sheet,如何将其导入oracle数......

    一个excel表格中有多个sheet,如何将其导入oracle数... 解决方案如下: 可以新建一个查询,查询你所说的2个表中的所有数据 运行查询,这样查询结果就包含了你要的数据,再把查询结果导出 就 ...

  2. PowerDesigner导出数据库表结构word

    打开PowerDesigner新建模型(系统环境变量必须配置32位JDK,否决将出现无法创建JavaVM错误信息powerdesigner Could not Initialize JavaVM!) ...

  3. ArcMap(ArcGIS)导出属性表用Excel打开中文乱码的解决方法

    前些天在做GIS实验时,发现用Excel打开ArcMap10.7导出的属性表中文是乱码,数字正常显示,便在网上搜罗解决方法.网上方法太多,比如下载安装官方补丁,修改注册表等等.个人感觉,麻烦而且不确定 ...

  4. 【保姆式教程】用PowerDesigner导出数据库表结构为Word/Excel表格

    使用PowerDesigner将表结构导出到word表格 一. PowerDesigner的下载安装 (已安装的跳过) PowerDesigner下载地址 后面只要next>>next&g ...

  5. php excel导出sheet表,phpexcel来做表格导出(多个工作sheet)

    1.先得去下载phpexcel文档,加压下来 /** * 简单实用Execl */ set_include_path('.'.get_include_path().PATH_SEPARATOR.dir ...

  6. powerdesigner 导出数据库表结构

    http://www.360doc.com/content/12/0817/19/61497_230730771.shtml 转载于:https://www.cnblogs.com/gaohuag/p ...

  7. POI动态导出多层表头的EXCEL文件

    POI动态导出多层表头的EXCEL文件 表格表头导出 单行表头 多行表头 以前接触过一个很古老的导出Excel,实现的逻辑是先声明一个导出的Excel模板,模板里报表的表头名称和顺序是固定的,这样执行 ...

  8. powerdesigner 导出word

    目的:使用powerdesigner导出word表结构  使用powerdesigner链接数据库后,发现没有显示显示表的注释和字段的注释,本文主要解决显示表和字段注释的问题. 怎么链接数据库,可以参 ...

  9. Oracle表里的照片怎么导出来,如何导出oracle数据库中某张表到excel_oracle数据库表格导出到excel...

    如何将oracle数据库表字段导成excel表格 这个你只要用ADO连oracle并获取记录集,根据你用的编程语言打开EXCEL,然后操作EXCEL对象的工作表就可以了.以VB为例: 1.在工程中引用 ...

最新文章

  1. 教你用 buildroot 构建根文件系统
  2. 11G中自动收集统计信息
  3. Spring Boot 如何自定义Starter,你知道吗?
  4. HDU2066:一个人的旅行(Dijkstra)
  5. javascript基础--数组排序
  6. ubuntu 修改 ssh默认端口号
  7. leetcode题解34-在排序数组中查找元素的第一个和最后一个位置
  8. 说说WeakReference弱引用
  9. UGUI之Toggle使用
  10. 返回一个数组的连续子数组和的最大值
  11. 一个神奇的网站。。。
  12. java Random类和Math.Rondom
  13. paip.python NameError name 'xxx' is not defined\
  14. 提交不了_志愿提交不了,不一定是系统问题。为了成功填报,建议试试这7步...
  15. linux 文件查找
  16. 新装好SQL2005时SA无法登陆的解决办法
  17. 编译原理初学者入门指南
  18. GIMP基本功能和教程!
  19. Boston Dynamics实验:机器狗对垒真小狗
  20. 【“计算机科学与技术”专业小白成长系列】计算机科学与技术主要学什么?

热门文章

  1. JS实现页面返回顶部
  2. Idea 中Git使用分支合并出现合并错误(refusing to merged unrelated histories)的解决方法!
  3. #435 津津有味:为了多活几年,人类终于对粗杂粮下手了
  4. iOS开发 开发笔记,图片裁剪成正方形图片;
  5. Kotlin学习(二)—— 基本语法,函数,变量,字符串模板,条件表达式,null,类型检测,for,while,when,区间,集合
  6. windows电脑与苹果手机、ipad实现文件共享
  7. Ubuntu14.04 和 Win7 双系统启动顺序更改
  8. SolidWorks 如何出 剖面图?
  9. 独家研究 I 以史为镜:美国养老产业的244年风雨发展史
  10. 关于情感分析的深度学习模型