Holarch
课程章节

培训 · 课程 6. 迁移到 Holarch · 第 6.2 章,共 5 章

6.2 从 Excel 和 CSV 导入需求 2:32

将需求电子表格作为文档导入,包括其层级、标签和属性。

演示 Holarch 2.21。

您将学到

  • 准备带标题行、大纲编号和 Class 列的电子表格
  • 导入电子表格,并在映射步骤中检查每一列的 Holarch 字段
  • 根据导入的行创建需求文档
  • 确认层级、标签和状态已从文件导入

从 Excel 导入 Plant Inspection Drone 的需求跟踪表:准备工作表,将导入配置为需求文档,检查每一列如何映射到字段、属性或标签,预览、保存,并在模型中查看带编号的层级、标签和状态。

项目文件

  • 起始项目 (.holarch.json;管理项目 → 项目文件 ▾ → 导入项目 (.json)…)
  • 完成项目 (.holarch.json;管理项目 → 项目文件 ▾ → 导入项目 (.json)…)

视频从 holarch.app 播放;参见隐私政策。

练习

在 Holarch 中基于 CubeSat EO-1 演示项目亲自完成此操作。

  1. 打开您的 EO-1 演示项目(如果没有,请创建:管理项目 → 项目文件 ▾ → 新建演示项目 → CubeSat(引导式系统工程))。在 数据库 中搜索 class:Requirement,单击 导出…,选择 表格 (CSV),勾选 Status 和 Priority(保持 标签 为勾选状态),然后单击 导出。
  2. 在电子表格应用中打开该文件。保留标题行以及第 1 和第 2 章节的行,然后在顶部添加两行:1、Mission Imaging、Class 为 Statement,以及 2、Attitude Determination and Control、Class 为 Statement。将其另存为 .xlsx 或 .csv。
  3. 在 管理项目 中单击 + 新建项目,将其命名为 EO-1 Import Practice,然后单击 创建项目。
  4. 打开 需要与需求 → 导入和导出,拖入文件,单击 继续,并检查每一列的 Holarch 字段(将不需要的列设为 跳过)。
  5. 单击 继续,保持勾选 根据这 N 个条目创建文档,然后单击 导入 N 个条目。
  6. 在新文档中,确认 1.6.1 和 1.6.2 位于 1.6 之下,并选择 1.5 查看其标签和状态。

当新文档显示第 1 和第 2 章节、其需求按编号嵌套,且标签和状态完好无损时,即完成练习。

自测

  1. Holarch 如何重建电子表格各行的层级?
  2. 有些行导入后的类不正确。为什么?
  3. 您想通过电子表格更新 50 条现有需求的负责人,而不是创建副本。如何操作?
显示答案
  1. Holarch 如何重建电子表格各行的层级?

    如果映射了父行 ID 或父级编号列,则依据该列,否则依据大纲编号:1.2 位于 1 之下。如果缺少父项,则使用最近的现有祖先。

  2. 有些行导入后的类不正确。为什么?

    如果 Class 列中的名称架构无法识别,则会回退到“无类的行所用的类”,并给出警告。请使用架构编辑器中的类名。

  3. 您想通过电子表格更新 50 条现有需求的负责人,而不是创建副本。如何操作?

    连同 ID 列一起导出,编辑文件,然后导入,将 ID 列映射到全局 ID,并将“匹配现有条目的依据”设为全局 ID。审查步骤随后会将它们列在“已更新的条目”下。

延伸阅读

文字稿

显示文字稿 (旁白和屏幕内容)

Introduction

Chapter two: requirements from Excel and CSV. Spreadsheets are where most requirements live before a model exists, and they come in with their hierarchy and their columns intact.

We import the Plant Inspection Drone's requirements tracker into the project from the last chapter.

Prepare the spreadsheet

Here is the tracker. It has a header row, and outline numbers that give the hierarchy: 1, then 1.1 and 1.2 under it. A Class column says which rows are section headings and which are requirements, and further columns hold labels, priority and status.

On screen: The spreadsheet.

Choose the file

Open Needs and Requirements, then Import and Export. One page takes every format: Excel, CSV, Word, ReqIF and more. Holarch detects the format from the file.

On screen: Needs & Requirements → Import and Export: one page for every format.

Drop the file on the drop zone. Holarch reads it, and reports how many rows and columns it found.

On screen: Drop the file → Analyzed.

Map the columns

Click Continue. Map lists each column, its sample values, and the Holarch field it goes to. Columns whose titles match a field or an attribute are mapped already: Number, Name and Description, Class, Labels, and the Priority and Status attributes.

On screen: Continue → Map.

Check every column before you go on. A column you do not want is set to Skip, and a field with no home in the schema can become a new attribute.

On screen: The mapping table.

Review and import

Click Continue to review. Holarch offers to make the rows a requirements document, and lists each new item before anything is created.

On screen: Continue → Review.

Click Import. The whole import is one undo step, so if something looks wrong, Command Z takes it all back.

On screen: Import 12 items → the new document opens.

With no warnings, the new document opens at once. The outline has the three sections from the sheet, and the requirements are numbered under them, just as they were in the tracker.

On screen: The imported document.

Check the result

Select a requirement. Its labels and its status came in from the sheet's columns, so the model already knows which requirements are in review and which are performance requirements.

On screen: Select 1.1 → inspector: Labels, then Workflow (Status).

Recap

Let's recap. You prepared the spreadsheet, imported it as a requirements document, checked the column mapping, reviewed and imported it, and found its hierarchy, labels and statuses in the model.

Next, a Word specification and a supplier's ReqIF file.