Import/Export Templates
ProContractor uses templates for importing and exporting data from ASCII files or CSV files.
When importing data from an external source into your application, the template defines the format of the external data and ensures it's imported correctly.
When exporting from your application to an external source, templates allow you to export only specific information from your estimate or catalog and to specify the format of the data in the file.
ProContractor has a number of predefined import/export templates and uses them for importing and exporting data from ASCII files or CSV files. If needed, you can modify the standard templates or create your own.
When you define a template, you must select a record format, which specifies how each field is separated from the next field in the file. You specify one of the following record formats for the data in the file:
- Delimited – Each data field is separated by a delimiter character. You specify the character. You can use two different delimiters (the first is called a separator and the second a delimiter) to separate each data field.
- Fixed – Each data field has a fixed length. The length is set to the maximum length of the field in the Estimating module.
When you select a separator, there is a chance that the separator character may already appear in the data you want to import or export. This is especially likely if you choose a comma (,) or a single quotation mark (') as your separator character. For example, if you used a single quote character (') and you had an item containing 16' to represent 16 feet, the import will fail. In these circumstances, you can't import the data. You must either select a different separator, such as an ampersand (&) or add a field delimiter. For example:
If you select comma (,
) as your separator character and an ampersand (@
) as your field delimiter, any text file exported will look like this:
@[Field #1]@,@[Field #2]@,@[Field #3]@
In this example, each individual field's data can be found between the @,@
character sequences. When used in this way, field delimiters can virtually eliminate the potential for errors involving separator characters.
A simple way to see what an import file should contain is to set up a column view in the Estimate tab and export the estimate. You would build your template to import it back in using the same fields that exist in the export file in the same order they are listed.
You can set a template to roll-up data to create a summary. The primary use of roll-ups are subtotaling cost information based on billing codes (which is usually then exported to third-party accounting software), and subtotaling all cost items by WBS code (which are usually then exported to a spreadsheet). On any roll-up, all numeric fields within the roll-up criterion (usually billing codes or WBS codes) are summed. If the contents of a text field are identical in each record in the roll-up, the text is retained. If, however, text fields don't contain the same text, the text is discarded. An exception to this occurs when records are rolled up based on exactly one WBS code; in this case, the WBS code description is placed in the Description field.