I have what appear to be a simple problem - yet a solution is proving rather elusive!!
I have a spreadsheet which generates 4 lines of configuration. Presently, I have to take the resulting text from each cell - and paste it in line by line. I thought it would be easier to generate a single string with Carriage Return (CR) characters so I could paste all lines in one go. However, When I add the CHAR(10) CR character - it adds speech marks round the first line of config:
4 lines of text from each cell pasted individually:
set security nat static rule-set CUST-A rule FW-10-10-0-20 description "Test Lab - London1 - 99999998"
set security nat static rule-set CUST-A rule FW-10-10-0-20 match destination-address 10.10.0.20/32
set security nat static rule-set CUST-A rule FW-10-10-0-20 then static-nat prefix 192.168.1.20/32
set security nat static rule-set CUST-A rule FW-10-10-0-20 then static-nat prefix routing-instance INTERNET"
However when I concatenate the values- either using "&" or CONCATENATE(x,y,z,etc) and puttting a & CHAR(10) CR/newline at the end of each, the result is:
"set security nat static rule-set CUST-A rule FW-10-10-0-20 description ""Test Lab - London1 - 99999998""
set security nat static rule-set CUST-A rule FW-10-10-0-20 match destination-address 10.10.0.20/32
set security nat static rule-set CUST-A rule FW-10-10-0-20 then static-nat prefix 192.168.1.20/32
set security nat static rule-set CUST-A rule FW-10-10-0-20 then static-nat prefix routing-instance INTERNET"
You can see the first line has additional " characters in it.
Any ideas anyone? Probably something to do with the speech marks, but these have to be in as shown in the first example....
Many thanks...
R
Bookmarks