This Specification Macro Task will look for the text in the first column of a specified input Sheet.
If the Project has a Variable with the same name, it will take the Variable result and insert it in the second column for each one found.
It will then calculate the Sheet and also run a Macro called CreateReports if it exists.
Please see the topic How To Create A Macro To Run On A Document for more information on the CreateReports macro.
It will then read the data from a two column multi row output sheet, and pass it into the Specification for driving into Constants or Controls.
Microsoft Office
Microsoft Office and DriveWorks Live running as a service through IIS
Services (IIS) do not have access to many applications, especially COM programs such as Microsoft Word and Excel.
When using DriveWorks Live and IIS please read the following articles for information on where to place this Task.
Property Name | Description |
---|---|
Title | Changes the Title (not the name) of the Task. |
File Name | File Name of the Excel File Including Extension. |
Show Excel | Workbook will be visible if set to TRUE. |
Input Sheet Name | Sheet name of the inputs sheet. |
Output Sheet Name | Sheet name of the outputs Sheet. |
Constant Name | Constant into which the Input and Output count will be stored. |
When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.
Property Name | Example Rule | Example Result | Meaning |
---|---|---|---|
File Name | "D:\DriveWorks\ExportCalcImport.xlsx" | D:\DriveWorks\ExportCalcImport.xlsx | Will use the Excel file ExportCalcImport.xlsx for the export and import. |
Show Excel | TRUE | TRUE | Will briefly show the Excel file while the export and import takes place. |
Input Sheet Name | "Input" | Input | Will use the sheet named Input as the Input sheet name. |
Output Sheet Name | "Output" | Output | Will use the sheet named Output as the Output sheet name |
Constant Name | DWConstantResults | 3 inputs driven and 4 outputs retrieved with zero failures | Will drive the results of the import and export to the constant named Results. |
The Excel sheet used to import the Variable values to is required to have two columns:
The sheet needs headers in the first row, which need to be Name, Value.
The data must begin on the second row.
A | B | |
---|---|---|
1 | Name | Value |
2 | BayLength | |
3 | BayQuantity | |
4 | Cost | |
Input |
The Excel sheet used to export values to Constants and Controls is required to have two columns:
If a Constant is found with the same name (not case sensitive) then the value from the second column will be passed into it.
If no Constant is found with that name, then DriveWorks will look for a Form Control with that name to pass the value to.
If no Form Control is found, then no action will be taken with that rows data.
If a Constant and Form Control exist with the same name the Constant will take priority.
The sheet needs headers in the first row, which need to be Name, Value.
The data must begin on the second row.
A | B | |
---|---|---|
1 | Name | Value |
2 | OverallLength | =Input!B2*Input!C2 |
3 | ValveSize | =IF(Input!B2>2000,"7/16-20 UNF","9/16-18 UNF") |
4 | MaterialThickness | =IF(Input!B2>2000,"1.6","1.2") |
5 | Color | =VLOOKUP(B2,E5:F100,2,TRUE) |
Output |
This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.
The status output navigation is as follows:
Success
Success with Warnings
Failed (one of the following occurred).