Macro in Excel on Sharepoint Online do not work

Copper Contributor

Hi,

I'm using Office 365ProPlus and have added a macro to my excel sheet to determine the last save date of this excel XLSM file. (using FileDateTime)

On my local PC this works as designed.

 

After uploading the file into sharepoint in the cloud, I have two option

  • Open the file in the browser --> Excel does not even recognice the Macro
  • Open the file in Excel           --> Excel recognices the Macro but returns as last save date 01.01.1900

 

Does anybody know how I can get Excel to work properly with Macros if the file is stored in the cloud ?

 

Thanks Reiner

6 Replies

Thanks for the quick response.

I learned now that it doesn't work with Excel online at all.

What's about local Excel with a file located in Sharepoint Online ? Should this work ?

Cheers

It worked for me.

 

When you recorded your macro where did you store it?

MacroStore.PNG

@Pieter Veenstra, do you think this was helpful for running Excel-Macro into sharepoint, coz i haven't find something related to his question?

@Pieter Veenstra I am having a similar problem, which of the 3 locations would be best to store the macro?

My gut says that keeping it 'local' and "This Workbook" would be the best location. Do you agree?

@ptstockley  Running Excel Macros is at least questionable. You could look at using Power Automate  with running scripts in Excel. This is something that is still very new and in Preview but it could be interesting.

 

For more on this please have a look at the following post:

https://sharepains.com/2020/07/21/run-script-with-excel-in-power-automate/