This Document type is used to export data directly in to a Sheet in a Microsoft Excel Workbook from the DriveWorks project.
To work effectively the Sheet to export the data to should contain named cells. DriveWorks will recognize the named cells and allow rules to be built for the values to export.
DriveWorks can use .xls, .xlsx and .xlsm files.
Files saved as an .xlsx are the quickest to generate as DriveWorks does not need to open Excel.
To Add an Excel Workbook document:
In DriveWorks Administrator open the Project the Document is to be applied and go to Stage4: Output Rules then Documents - Files
- Click the "Add" button on the command bar.
- Choose the Excel Workbook Document from the list on the Add Document wizard.
- Give the new Document a name.
- Click "Next" and then Browse to the location of the Excel file using the "Browse" button.
- Select the file and click Open and the click "Finish".
To Edit an Excel Workbook:
- The Master Workbook Path is the location of the master file, which can be browsed to if the location of the file changes by clicking the "Browse..." button.
- The Document Name is the name that will be given to the newly created file. This can be built by clicking the "Build..." button.
- The Document Path is the location where the new copied file is going to be stored. This can be built by clicking the "Build..." button.
- The Named Ranges is a range of cells that DriveWorks will write information into. The rules for the named ranges can by built by selecting the named range from the list and clicking the "Build..." button. The data can also be refreshed to bring in new named ranges by clicking the "Refresh" button.
- DriveWorks can create a HTML version of the Document to open in a web browser by checking the "HTML Output" option in the General Settings.
When using DriveWorks Live
When creating HTML files ensure the created document is located in its own folder so access is only provided to the files used in the resulting document.
- The General Setting, Hide from Document List is used to hide the Document from the Document List in the Specification Explorer.
The Document Name will need to be unique if the Document is created in the same location for each Specification, otherwise existing Documents will be overwritten.
The Document can be Deleted if it is not required by making the result of the Document name return Delete.
At any point a HTML preview can be created by clicking the "Preview" button on the command bar.
If the Document Path is not set then the file will be created in the Specification Folder.
How to create a Named Range in Excel
- Open the Excel Workbook and select the cell that is to be the Named Range.
- Activate the Formulas tab and open the Define Name dialog.
- Give the cell a unique name and click 'OK'.
- Save and close the workbook.
Running Macros on an Excel Workbook Document
DriveWorks will automatically execute a macro called CreateReports, after driving all the captured cells and prior to the new Document being saved.
The CreateReports macro must exist in a module named DriveWorks, in the VBA Project for the Document.
The Excel Workbook Document is triggered in the Specification Flow by the Release Documents task.