Converting VBA scripts to Office scripts for easier automation
Our take
hey everyone, currently i have a VBA script that i manually run everytime a certain file is sent from a particular email address.
for context the flow of the automation is done this way:
file received through email -> automatic download -> manually trigger the VBA automation -> data from the sent file is transformed and kept in multiple different excel files.
the automation itself is slightly lengthy and complicated. It basically converts bunch of data from the file sent, breaks it into different files with the required pieces of data for upload.
what im trying to look at is, is there any way to basically eliminate this need to manually tiggering this vba automation myself? i get this report sent multiple times a month and as convenient, my vba automation has made this process its still a hassle 😂.
I've heard of Office scripts being an option but can anyone please let me know if its possible? any resources would also be beneficial.
thank you.
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- What are your favorite Office Scripts that you use often or saves you the most amount of time?I often use VBA and LAMBDA functions to speed up my work. My favorite VBA script, which I use a lot, is one that lets me append worksheets from another workbook into my active workbook. However, because of Excel Online and security concerns, things are shifting toward Office Scripts. Some VBA scripts I couldn't migrate (like the one above), but others worked. For example, one I use regularly is an Office Script that consolidates the worksheets of my workbook into a single worksheet: (I am not allowed to post this here as square brackets are forbidden) I'm curious how many of you use Office Scripts and what you've built with them to save time. submitted by /u/ExoWire [link] [comments]
- How do you properly hand over Office Scripts or trigger Power Automate flows from Excel without relying on personal OneDrive?Hi everyone, I’m running into a problem and I hope someone here has experience with this. I was asked by another department to automate one of their workflows in Excel. So far so good. I didn’t want to use VBA because our company is slowly phasing it out, so I took this as an opportunity to gain experience with Office Scripts. The script itself is finished. It can be triggered via a button and it works as intended. However, I realized that I don’t want the script to live in my personal OneDrive “Documents/Office Scripts” folder. I want to hand it over to the department so they can use it independently. My idea was to create a subfolder called “Scripts” next to the Excel file and store the scripts there. But here’s the problem: I have no idea how to reference or trigger those scripts from Excel. Excel seems to only recognize scripts stored in the personal Documents folder. Even if I manually place the script there (tested with a separate account), Excel still doesn’t detect it. So I thought about triggering the script through Power Automate instead. Surprisingly, that works well — and PA doesn’t care where the script file is stored. BUT now I have a new issue: How do I link the flow back to the Excel file? Ideally, I want a button inside Excel that starts the flow. The users of this file are not technical at all, so it needs to be as simple as possible. I couldn’t find any way to connect a button in Excel to a Power Automate flow — except by using Office Scripts again, which would put me back in the same situation where the script must be stored in my personal OneDrive… which defeats the whole purpose. Has anyone dealt with this before? How do you hand over Office Scripts or trigger flows in a clean, future‑proof way so everything keeps working even if you’re no longer around? Thanks a lot for your help! PS. This text was translated and optimized with AI submitted by /u/MR_Datenanalyse [link] [comments]
- how did you improve your workplace's legacy vba macros?I recently transitioned to a non-clinical role in a public health care system. part of the on-boarding was a 12 page, 20 step tutorial on how to 'do the macros'. The workflow simplified is: - Get source data from EHR/BI - Open the excel online (microsoft 365) "Daily Review" workbook in the desktop ms excel. (hopes and prayers it doesn't crash) - copy data (columns of patient ID, demographics, medications... you get the idea) from EHR, paste into this Daily Review - run macro (click a button) which cleans, filters, applies conditional formatting i think - save - go back to excel online and resume editing there. The VBA code was created (not sure if it was written coz it has no documentation) by a colleague who is on extended mat leave. I can see a lot of 'modules'. Can't tell which is active. There are probably lots of historical decisions. The daily review file with its many many sheets is saved in multiple locations in case newcomers like me or others break it by accident. I am told we can't change anything like move a column closer to the beginning coz well we can't. I don't know VBA but could probably figure it out if I watch a tutorial on it. I am linux user and know basics of C, python and make good use of my claude code with the pro subscription but never really worked with spreadsheets. I am wondering if anyone was in a similar situation and how you managed it. Is moving to office scripts (typescript) a viable alternative? Any other life improving tips would be appreciate it. Or maybe I should just give up and focus the energy elsewhere? submitted by /u/Neat-Badger-5939 [link] [comments]
- Excel Power Automation - Sending Emails to Users Based on Sheet CriteriaHi All! My organization currently uses a website called Smartsheets to create task lists. I've created automations that run each morning that send emails to users if a task becomes past due. It fulfills the intended purpose; however, every single month there seems to be some new issue; therefore, I'd like to transfer over to using functionality in native Excel. My research turned me on to Power Automation. I found the tools I needed until I hit a roadblock: P.A. does not look at the contact within the sheet and send a message to that person. It appears to just go to one designated individual. Any thoughts, recommendations, or solutions? I am almost at the end of my rope and ready to just deal with Smartsheets. A screenshot of our task list can be found in the comments. Maybe it provides some reference that I missed. Thanks! submitted by /u/bltsmith [link] [comments]