First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
It sounds like you are asking someone to do your homework for you, which is not really the purpose of this forum.
You need to write a Python script yourself, at least showing that you made some effort, then people can advise you where you are going wrong.
Have a look at the functions aflowreal and atrnreal. You can use them to get arrays of loading data. Then you can export using excelpy functions. Happy coding!