PowerDesigner中根据数据库设计图导出数据库表字段到Word

本文介绍了如何使用PowerDesigner根据数据库设计图高效地导出表字段到Word,避免手动输入带来的大量工作量。通过设置报告模板,可以自定义样式,并通过简单步骤生成符合要求的数据库设计说明书。
摘要由CSDN通过智能技术生成

PowerDesigner中根据数据库设计图导出数据库表字段到Word

有什么用?

在项目的文档编写中,数据库设计说明书是必不可少的。本人之前在毕设中写数据库说明的时候是逐个输入,现在想想真的是愚蠢至极。若是小项目数据表较少当然无所谓,若是大项目,手动输入近百张数据库表到Excel那是一个相当大的工作量,最近学习到了一种非常简单的表字段获取方法是用PowerDesigner的报告直接生成。鉴于这方面的资料稀缺,特此分享给广大网友。

关于table

标准的工作空间及图表放置如下图所示:
在这里插入图片描述

注意点:
1、确保所有的数据库设计表都在一个table内;
2、如果一个工作空间的系统中包括多个子系统,请逐一放入table中导出;
3、如果一个工空间中只有一个系统的设计图,但分布在不同的table中,那么将所有的表放入到最下方的一级table中,若没有一级table则新建,如下图所示:
在这里插入图片描述

报告模板

可以根据自己的需求,设计出符合要求的模板,如表头、间距、字体、等等。
将下文代码复制并设置为 .rtp后缀格式作为模板
在这里插入图片描述

<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{3C82EAEC-BB5A-4FFB-BCF5-57C96D2AD3C2}" Label="" LastModificationDate="1562814678" Legacy="1" ModuleID="PDM" Name="wordTemplate" Objects="29" Symbols="0" Type="{A6BAC8D1-B730-11D1-8898-00A02455633B}" signature="RPT_TEMPLATE" version="16.5.0.3982"?>
<!-- do not edit this file -->

<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">

<o:RootObject Id="o1">
<c:Children>
<o:BaseReport Id="o2">
<a:ObjectID>3C82EAEC-BB5A-4FFB-BCF5-57C96D2AD3C2</a:ObjectID>
<a:Name>wordTemplate</a:Name>
<a:Code>ReportToWord</a:Code>
<a:CreationDate>1303635366</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1368973883</a:ModificationDate>
<a:Modifier>ferry</a:Modifier>
<a:HtmlStylesheetFile>LightBlue_Theme.css</a:HtmlStylesheetFile>
<a:HtmlHeaderFile>Header_LightBlue.html</a:HtmlHeaderFile>
<a:HtmlFooterFile>Footer_LightBlue.html</a:HtmlFooterFile>
<a:HtmlHeaderSize>54</a:HtmlHeaderSize>
<a:HtmlFooterSize>18</a:HtmlFooterSize>
<a:HtmlTOCLevel>4</a:HtmlTOCLevel>
<a:HtmlHomePageFile>Home_LightBlue.html</a:HtmlHomePageFile>
<a:HtmlTemplate>Light Blue</a:HtmlTemplate>
<a:RtfTemplate>Professional</a:RtfTemplate>
<a:RtfUseSectionHeadFoot>1</a:RtfUseSectionHeadFoot>
<c:Paragraphs>
<o:ReportTitleParagraph Id="o3">
<a:ObjectID>516C18E4-2441-4B09-95C3-614CE211F854</a:ObjectID>
<a:CreationDate>1303635366</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1303635366</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier>
<a:ReportBaseParagraph.FontName>新宋体</a:ReportBaseParagraph.FontName>
<a:FontHeight>10</a:FontHeight>
<a:FontStyle>1</a:FontStyle>
<a:ReportBaseParagraph.Alignment>4</a:ReportBaseParagraph.Alignment>
<a:SpaceBefore>423</a:SpaceBefore>
<a:SpaceAfter>106</a:SpaceAfter>
<a:BorderType>15</a:BorderType>
<a:Box>0</a:Box>
</o:ReportTitleParagraph>
<o:ReportParagraph Id="o4">
<a:ObjectID>68353469-90B0-46A5-AEFF-FEF9E8A72B5B</a:ObjectID>
<a:CreationDate>1303635366</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1303635366</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier>
<a:ReportBaseParagraph.FontName>Microsoft Sans Serif</a:ReportBaseParagraph.FontName>
<a:FontHeight>10</a:FontHeight>
<a:ReportBaseParagraph.Alignment>4</a:ReportBaseParagraph.Alignment>
<a:Box>0</a:Box>
</o:ReportParagraph>
</c:Paragraphs>
<c:Sections>
<o:ReportTemplate Id="o5">
<a:ObjectID>BBBE7584-E433-442F-8BFF-0FE6E664E4A5</a:ObjectID>
<a:Name>wordTemplate</a:Name>
<a:CreationDate>0</a:CreationDate>
<a:Creator/>
<a:ModificationDate>1368973883</a:ModificationDate>
<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值