Powershell gurus help wanted!

I have been trying to write a script/program to help out with a task in my organisation. I built a GUI in windows forms and that went well. Now I am trying to retrieve date from excel and word files from sharepoint as they contain data that will be used to populate blanks in another document and that’s the purpose of the script. I cannot for the life of me fight this out, I have tried so many different things and each time there is a different error from “Root element is missing” to “Error retrieving files from sharepoint” to “403 forbidden”. Can somebody please save my sanity and let me know of a way that actually works? If any extra info or even the script I have currently is needed then just ask, thanks!