I am not exactly sure I understand you correctly, but I assume you want a single multi-line string created from all the rows in your Excel file. If that assumption is correct, a flow like this can do it:

The idea is that you need to open Excel, read the data, then close Excel and loop through the items you retrieved.
For each row in the table, you set the string value and add it to a list. Once the loop is done, you join the list using a new line as the delimiter.
This will result in the %JoinedText% variable looking like this at the end:

Here's a code snippet for the entire flow if you want to copy and paste it into your PAD designer to have the same actions created automatically for you:
Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\RPA\\Strings.xlsx''' Visible: False ReadOnly: False Instance=> ExcelInstance
Excel.GetFirstFreeColumnRow Instance: ExcelInstance FirstFreeColumn=> FirstFreeColumn FirstFreeRow=> FirstFreeRow
Excel.ReadFromExcel.ReadCells Instance: ExcelInstance StartColumn: $'''A''' StartRow: 1 EndColumn: FirstFreeColumn - 1 EndRow: FirstFreeRow - 1 ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData
Excel.CloseExcel.Close Instance: ExcelInstance
Variables.CreateNewList List=> List
LOOP FOREACH CurrentItem IN ExcelData
SET String TO $'''When ListName = \'%CurrentItem['ListName']%\' then Code = \'%CurrentItem['Notes']%\''''
Variables.AddItemToList Item: String List: List
END
Text.JoinText.JoinWithDelimiter List: List StandardDelimiter: Text.StandardDelimiter.NewLine DelimiterTimes: 1 Result=> JoinedText
Note: you will need to change the path to the file in the Launch Excel action so that it leads to the actual file you want to read.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution.
If you like my response, please give it a Thumbs Up.
If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/