Home Search

DriveWorks Pro 22
Import Multi Column Named Sheet from Excel into Constants and Controls

Send Feedback

Import Multi Column Named Sheet from Excel into Constants and Controls

This Specification Flow Task reads in multiline, multi column data from a named sheet in an Excel file, and passes them into the specification for driving into constants or controls.

Microsoft Office

  • Ensure Microsoft Office is installed on all DriveWorks machines that will process this Task.

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.

Import Multi Column Named Sheet from Excel into Constants and Controls Properties

Property NameDescription
TitleChanges the Title (not the name) of the task.
File NameFile Name of the Excel File Including Extension.
Sheet NameSheet to pull the data from
Show ExcelWorkbook will be visible if set to True.
Return ConstantThe name of the constant that the named pairs will be posted to for reference.

Example Data

The Excel sheet used for the import is to have a minimum of two columns:

  • The first column contains the name of the constant or control (do not include the DWConstant prefix or the Return suffix).
  • The remaining columns contain the values to be passed into the constant or control.

If a constant is found with the same name (Not case sensitive) then the value from the remaining columns will be passed into it as a pipe bar delimited text string.

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 control is found, then no action will be taken with that rows data.

If a constant and control exist with the same name the constant will take priority.

The sheet needs headers in the first row, which need to be in the format:

NameValue1Value2Value3
OverallLength
485679952
ClevisOptionUniversal ClevisNo ClevisClevis Adapter
TotalPrice$253.75$206.50$375.80

Status Outputs

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

  • Data from Excel successfully imported

Success with Warnings

  • N/A - Should never be fulfilled.

Failed (one of the following occurred).

  • File name is empty
  • Target file not found or could not be accessed
  • Target file extension is invalid
  • Sheet name is empty
  • Failed to find Sheet in Excel
  • Unknown error occurred