Home Search

DriveWorks Pro 21
Document Rules: Excel Workbook

Send Feedback

Document Rules: Excel Workbook

DriveWorks can create new documents by using an Excel worksheet as a template. Rules are applied to named ranges in the workbook to drive data, relevant to the specification, into the new document.

Excel Workbook Rules

Document Name Rule

The document name rule is used to determine the name of the new document, or to prevent the document from being created.

RuleMeaning
"DELETE"Prevents the document from being created.
DWSpecificationIdCreates a new Excel document with the specification number used for the file name - for example, "Parts List.xls" would become "1.xls" if it was generated by the first specification.
DWSpecificationId&".csv"Creates a new Comma Delimited document with the specification number used for the file name - for example, "Parts List.xls" would become "1.csv" if it was generated by the first specification. See File Extension table below for all file types that can be created from an Excel document.
DWSpecificationId&".PartsList.xls"Creates a new Excel document with the specification number and .Parts List used for the file name - for example, "Parts List.xls" would become "1.PartsList.xls" if it was generated by the first specification.
When using "." in the naming of a document the file type extension must always be included.
If the file extension is excluded the file type of the document will take the name of any text included after the "."
File ExtensionFile Type
.xlsExcel 97 - 2003 workbook
.xslmMacro enabled workbook
.xlsxExcel 2007 workbook
.xmlXML Data
.htmlWeb page
.txtUnicode text
.csvCSV comma delimited
The file types that are available depend on the version of Microsoft Excel installed on the machine that is generating the document.
To produce the document in a file type that requires additional configuration options (such as .pdf) consider using the ability of DriveWorks to automatically run a macro on a document see  How To: Create A Macro To Run On A Document for more information.

Document Path Rule

The document path rule controls the folder that the document is created in.

If the folder specified by the Document Path Rule does not exist it will be created by DriveWorks when the document is created.
RuleMeaning
""If the rule is blank the document will be created in the Specification Path folder which is applied in the Specification Settings.
"\Documents"If the Specification Path is set to "C:\DriveWorksPro\"&DWSpecificationID the document will be created in the C:\DriveWorksPro\1\Documents folder if it was generated by the first specification.
"C:\DriveWorksPro\Generated Documents"The document will be created in the C:\DriveWorksPro\Generated Documents folder

Named Ranges

All named ranges and cells are displayed in the Named Ranges window. Current values of any named ranges will be restored in the new document unless a rule is applied.

RuleMeaning
""If the rule is blank any value in the named range will be removed
DWVariableTotalQtyReports the result of the variable TotalQty into the named range
DWCurrentUserNameReports the name of the person logged into DriveWorks as defined in Security Settings.

Create PDF

Portable Document Format (PDF) files can be created, by default, for documents based on Microsoft® Word and Excel files.

When a Microsoft Word or Excel document is created or edited, the options for the additional formats to be created are listed under General Settings.

The available options are:

  • Word or Excel File (The format native to the document type created)
  • HTML File
  • PDF File

To create the additional format check the box in the Create Document column.

To prevent the document file type from displaying in the Specification Explorer check the box in the Hide From Document List column.