Dear Kasung3,
How to export data from Revit to Excel is demonstrated by the FireRating and other official Revit SDK samples.
How to set up borders etc. has nothing to do with Revit, so you will have to research that elsewhere.
This topic and associated areas were recently discussed by The Building Coder on RDBLink and Exporting Data from Revit:
Best regards,
Jeremy