Excel Column Headers

cat ABC.log | egrep "Error 500" >> /tmp/Logs.log
egrep "<Mango>.<.Mango>" Logs.log | sed -e "s/^.<Mango/<Mango/" | cut -f2 -d">"| cut -f1 -d"<" >> /tmp/temp1.xls
egrep "<Apple>.<.Apple>" Logs.log | sed -e "s/^.<Apple/<Apple/" | cut -f2 -d">"| cut -f1 -d"<" >> /tmp/temp2.xls
print Heading1, Heading 2 >> /tmp/output.xls
paste /tmp/temp1.xls /tmp/temp2.xls > /tmp/output.xls

Output:

Heading 1 Heading2
Mango1 Apple1
Mango2 Apple2
.
.
.
.
So on...

But when iam executing this query, The heading 1 and Heading 2 is like
"Heading1 Heading 2" in the first cell of the excel. I want them to be in different columns as column headers.

You help will be appreciated....

Try to separate the fields with a comma or semicolon. You can also save your file with a .txt extension, then import the file in excel with the wizard where you can choose a field delimiter and save the file as a .csv file

Regards