You are aware that Excel immediately reads a csv file without issue ... hence why my suggestion to make your life easier
As to your output, the from field identifies users who have logged into said computer / server from somewhere other than the machine itself.
In your case, only oracle user is accessing this machine from an external machine, thus all the others have a blank field meaning they have accessed this machine from within.
You can add attachments if you press the 'Go Advanced' button, but excel files are not accepted so you would need to convert is to a csv and then add the .txt extension
As for finding which rows have a from field, this would best be found by the number of fields on a given row and then returning only those that exist.
To this end, I would probably just write the whole thing in awk instead of bash and then going to awk to get the details

Although, your task would be just as easy using only bash and a while loop