Home Search

DriveWorks Pro 22
Export/Calculate/Import To and From Named Ranges in Excel

Send Feedback

Export/Calculate/Import To and From Named Ranges in Excel

This Specification Flow Task will look in all named ranges in an Excel file, and for each one, checks to see if a Variable exists with the same name.

If a variable exists, it will drive the named range value to be the variable value.

It will then run a Macro called CreateReports if it exists, this will only work for .xls and .xlsm files.

It then looks in the named ranges again and reads in all data found in named ranges in the Excel file and passes them into the Specification for driving into Constants or Controls.

If a Constant is found with the same name as the named range (not case sensitive) then the value from that named range will be passed through to the Constant.

If no Constant is found with that name, then it 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 named range data.

Named Ranges

  • Avoid using any merged cells as the named range.
  • When applying a Named Range using the Name Manager (in Microsoft Excel) it is possible to set the scope of the range to be worksheet specific. We recommend only using workbook specific ranges when setting up the Excel workbook to export into.

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.


Property NameDescription
TitleChanges the Title (not the name) of the task.
File NameFile Name of the Excel File Including Extension.
Show ExcelWorkbook will be visible if set to True.
Constant NameConstant 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 NameExample RuleExample ResultMeaning
FileName"C:\MyDocuments\SpecData\NamedRanges.xlsx"C:\MyDocuments\SpecData\NamedRanges.xlsxThis is the Full File Path including extension for the Excel File that contains the Ranges.
ShowExcelTRUETRUETRUE will show the Excel workbook opening when you run the Task.
Constant Name"ExportReport"ExportReportThis is the Constant that will have the Input and Output count values stored into it.

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:


  • Data sent and retrieved successfully

Success with Warnings

  • N/A - Should never be fulfilled.

Failed (one of the following occurred).

  • File name is empty
  • Target file does not exist or could not be accessed
  • Target file extension is invalid
  • Unknown error occurred