A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
The data you showed had an extra line after the data for SchoolA but not the others. This procedure includes a preliminary steps to deal with that also.
- Open the text file with your editor of choice. I used Notepad++. If you use a different one, you may need to find the equivalent commands.
- Replace every occurrence of "\r\n\r\n" with "\r\n". This will remove the blank lines.
- Replace every occurrence of "\r\nS" with "\tS". This will remove the line break after the last line in each group. If there are groups that start with a letter other than "S", repeat this for those letters also.
- Replace every occurrence of "\r\n" with ",". This will remove the remaining line breaks from the file.
- Replace every occurrence of "\t" with "\r\n". This will restore the line breaks after the last line in each group.
- Rename the file from ".txt" to ".csv".
- Open the file in Excel.