Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • STATA & Sharepoint

    Hello,

    My company is moving towards using Microsoft Sharepoint/Teams for file sharing. Historically, I export xlsx files (usually raw data or data that's been wrangeled) from STATA to a shared drive that my coworkers can access. I pull data using a do file (making it a repeatable process as I have many perenial data requests) from SSMS via ODBC connection. I'm wondering if it's possible to export from STATA to a Sharepoint xlsx file that will automatically update in Teams. Is anyone aware of how to do this? When I export to a shared drive, I use sheetreplace to overwrite the previous xlsx file with new data. I can hardcode the file path in the do file which makes the process extremely efficient. However, I have not been able to figure out how to do so to Sharepoint. Any help would be much appreciated.

  • #2
    Not likely. This would, in theory and depending on the details, be possible with Python (depending exactly on how the uploading works), but it's likely complicated in terms of raw stata code, or outright impossible.


    I could be totally wrong about this as I'm not in the industry, so maybe someone has a better sense of it than me.

    Comment


    • #3
      I haven't tried this yet myself but I found these instructions when thinking about trying it some time ago: https://stackoverflow.com/a/61663461/10637373

      You could run the Python code from within a .do file using Stata's -python- command.

      Comment

      Working...
      X