Jump to content
Macro Express Forums

Append Macro Data to Shared Google Sheet


Recommended Posts

Hi All, 

Hoping someone can help with this ongoing headscratcher I am dealing with. 

Currently I have a shared macro for business data that saves and appends all data to an Excel CSV file. People can use the macro on their own profiles and it will still save their data to our shared CSV. 

We are losing our shared drive and being moved to Google Drive, so this is where the problem comes in. I use Variable Modify String: Append > Variable Modify String: Append to Text File. Filename is the path to the CSV in our Group drive.

We have all synced our Google Drive to our profiles so I am amble to create a file path that is similar, however this part is different for each user, and looks like so: C:\Users\USERNAME\Google Drive\Folder A\Folder B\Shared Excel Data File.csv 

The username is obviously different for each person, so one might say: 

C:\Users\Bill\Google Drive\Folder A\Folder B\Shared Excel Data File.csv 

C:\Users\Adam\Google Drive\Folder A\Folder B\Shared Excel Data File.csv 

Is there a way to apply the environment variable automatically so that we can still make global changes without having colleagues import a new macro with each update? For example, can I have a constant environment variable like USERPROFILE, which is C:\Users\USERNAME\ on our systems? Then have it somehow combined with the remaining path Google Drive\Folder A\Folder B\Shared Excel Data File.csv ? 

Sorry, that was long-winded, and hopefully it makes sense, but any help is greatly appreciated! Thank you!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...