Upload Connection string substitutions from an EXCEL/CSV template
The “LOAD CHANGES FROM EXCEL OR CSV TEMPLATE” button in the “Find/Replace/Update Connection” tab of the Connection String Center will allow you to load your Connection String substitutions from an EXCEL spreadsheet (.xlsx) or a CSV (comma separated, .csv) file.
GOFR will allow you to load multiple rows of substitution data from one file.
Please follow these steps to make sure your data is imported properly.
- Click the “EXPORT CHANGES TO CSV” button to create a blank template. This step is a little different than when working with text substitutions. The reason is that you must tell the program which connection properties you want to import, and the easiest way is to create a “blank” export with all the columns and rows populated: the export has one row for every connection property the program knows about, and one row for every operation you already entered.
- Add the necessary data to the template as per the table below. Note that you can create multiple rows for the same connection property. Simply duplicate the row in excel keeping the
Elementvalue the same. - Save the file as
.csvor.xlsx, click “LOAD CHANGES FROM EXCEL OR CSV TEMPLATE” and select it.
Loading a template replaces the find replace operations that are in the tab now.
Rules
- An entry with BOTH blank Text To Find and Text To Replace will be ignored by the program. You can leave the Text To Find blank. This tells the system to place whatever value is in the Text To Replace into the connection property which does not have a value in the document.
- A row whose
Elementdoes not match a connection property known to the program is ignored. - To load substitutions from Excel, the data must appear in the first sheet of the workbook.
- The data must appear with appropriate headings in the first row (row 1).
- Columns can be in any order BUT they must have the appropriate headings.
- The headings MUST be spelled exactly as per the table below. Upper and lower case does not matter.
- No more than about 300 rows are read.
- The trial version loads only the first 2 rows of a
.csvfile and the first 5 rows of an.xlsxfile.
Columns
| Field Name (Must appear as the header for the column) | Description |
|---|---|
Element |
Identifies the connection property you wish to update. If you do not know the value, simply export to csv first, all the values will be provided. |
Text To Find |
This is the text you wish to find in the connection property specified in the element. It can be a regular expression or a wild card pattern (see further settings below). |
Regex Find |
Value: True or False. If True, text to find will be treated as a regular expression pattern. See more here: Regular Expressions. Note that if True is entered, it will color code Text To Find in Green. |
WildCard Find |
Value: True or False. If True, text to find will be treated as a wildcard expression. See more here: WildCards. Note that if True is entered, it will color code Text To Find in Yellow. |
Text To Replace |
This is the text you wish to replace with in the connection property specified in the element. It can be a regular expression or a wild card pattern (see further settings below). Color coding applies the same as for Text To Find. |
Regex Replace |
Value: True or False. If True, text to replace will be treated as a regular expression. |
WildCard Replace |
Value: True or False. If True, text to replace will be treated as a wildcard pattern. |
Case Insensitive |
Value: True or False. When True, the upper and lower case of the text you are searching in your document is ignored. |
For the True / False columns you can also enter 1 or 0.
For example, a row with Element set to the connection string property, Text To Find Server=myServer;Database=myDb and Text To Replace Server=myNewServer;Database=myDb points every matching connection to the new server.
Special considerations
- When regular expressions or wildcards are turned on, case insensitive values are set to false and disabled. They do not apply to regular expression pattern searches.
- If a Regular Expression or WildCard search pattern is entered incorrectly, the corresponding text field will be color coded in Pink.