# db2word **Repository Path**: chendong_1994/db2word ## Basic Information - **Project Name**: db2word - **Description**: 导出表结构到word文档中 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-23 - **Last Updated**: 2022-08-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # db2word #### 介绍 导出表结构到word文档中 #### 使用方式 - 在main方法指定数据库和链接信息 ```java //配置数据库名称 String jdbcSchema = "xxx"; Class.forName("com.mysql.jdbc.Driver"); Connection connection = null; // 配置数据库链接 connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/zgc", "root", "123456"); ``` - 指定文件位置 ```java // 指定生成的文件名 generaDataBase(dataBase, new File("table.xml")); ``` - 使用word打开生成的 xml 文件,再另存为 docx 文件即可