You can use an Excel Macro to get data from a terminal screen and put it into a spreadsheet.
This sample uses the GetText method to get data from a session.
First, the sample creates a Reflectionsession. The IBM sample does this by creating a new session and then assigning it the demo Host/IP address. The Open System sample opens an existing session. For details about concepts related to this part of the sample, see Create a Session From a Microsoft Excel Macro and Open a Session From a Microsoft Excel Macro.
Then it navigates through the session to get to the screen data we want to copy.
When the program is on the screen with the data, the GetText method is used to get a row or data as a string. The Replace function is used to handle compound words and to remove unwanted characters and the Excel Trim function is used to remove all extra leading and trailing spaces and spaces between words. Then the string is converted to an array.
Finally, the sample loops through the array and assigns the value of each element to a cell in the spreadsheet.
This process is repeated until the macro encounters an empty row.