This Specification Task inserts an image into an Excel document to replace an existing shape that has a specific title.
This Task will only work with versions of Office up to and including version 1803 (Build 9126.2275).
|Title||Changes the Title (not the name) of the Task.|
|Source File Name||File Name of the document to edit (Should be rooted or relative to the Specification Directory).
The Source File Name is the name of the document once it has been created by a Specification.
|Titles of Images||Pipebar (|) delimited list of titles of images to be replaced.
This is the Title given to the inserted shape (see Set Up below).
|New Images File Names||Pipebar (|) delimited list of images to insert, in the order they are required to be inserted relative to titles (Must include Full File Paths, or paths relative to the parent file).|
|Show Excel||Excel application will be visible if set to True.|
|Export Sheet Name||The sheet name in the spreadsheet that will be exported.|
|Extension for Saving File||Pipebar (|) delimited list of extensions to save the file as (e.g. .pdf|.xps|.txt).|
The Replace Image task works by replacing a Shape in the Excel document.
To create a shape in the master document, of the file that is to have the image replaced, follow the steps below:
|Step 1||In the master document...
Click the INSERT menu, select Shapes and select a rectangular shape to insert.
Draw the shape at the point the image is required to be.
The original Line, Effects and Text Box properties of the shape will be maintained.
Only the FILL property will be changed to Picture Fill when the image is replaced.
Shapes with rounded edges, thick borders etc. will be preserved when the image is inserted. Images will be cropped and scaled to suit the size and layout of the original shape.
|Step 2||Right Click the shape and select Format Shape from the menu.
From the Format Shape menu (usually located on the right hand side of the Microsoft Excel window) select the Layout & Properties icon.
Expand the ALT TEXT item and enter a name for the shape in the Title field.
This is the name that is to be entered into the Titles property of the task.
When this Task is added the properties are static. To be able to build rules on a static properties see How To: Change A Static Property To A Dynamic Property.
|Property Name||Example Rule||Example Result||Meaning|
|Source File Name||DWSpecificationfullPath&"\TableMaster.xlsx"||C:\MyDocuments\Project 9999\TableMaster.xlsx||This is the Full File Path location of the Excel document to replace images for.|
|Titles Of Images||"Logo"||Logo||This is a pipebar (|) delimited list of Titles of images to be replaced. These are the Titles of the shapes that you have set Titles for using Alt Text.|
|New Images File Names||"C:\MyDocuments\MyPictures\Logo.JPG"||C:\MyDocuments\MyPictures\Logo.JPG||This is a pipebar (|) delimited list of images to insert, in the order they are required to be inserted relative to the Titles of the images order.|
|Show Excel||TRUE||TRUE||TRUE will make the Excel application visible. FALSE will not.|
|Export Sheet Name||"Sheet1"||Sheet1||Sheet1 is the name of the spreadsheet that will be exported.|
|Extension For Saving File||".xlsx"||.xlsx||This will save the Excel document as a docx file.|