macro for generate costing

hey, I am trying to create a macro to generate costing for sheet metal. I was able to run the csoting addon through macro. But I am unable to generate report and save in excel format. Can someone help me in writing the code for the same.