I would like to fetch value of BSNValue field from excel file and update the same BSNValue against the matching alert_name in corresponding text file.
Original Excel file
| Alert_Name | BSNValue |
|:---:|:---:|
| Alert_number_1 | SVS176 |
| Alert_number_2 | SVS456 |
| Alert_number_3 | SVS678 |
| and so on | |
Original Text File
\[Alert_number_1\]
Alert.test=true
Alert.BSNValue=$BSNValue$
\[Alert_number_2\]
Alert.test=true
Alert.BSNValue=$BSNValue$
\[Alert_number_3\]
Alert.test=false
Alert.BSNValue=$BSNValue$
....and so on
Expected output in a text file:
\[Alert_number_1\]
Alert.test=true
Alert.BSNValue=SVS176
\[Alert_number_2\]
Alert.test=true
Alert.BSNValue=SVS456
\[Alert_number_3\]
Alert.test=false
Alert.BSNValue=SVS678\`
type here
....and so on Any help/direction much appreciated.
I am thinking of using regex pattern to match same Alert Name from text file and excel file and then take values from excel file of Alert.BSNValue and update the same in text file.