I have a pivot table that I have to manually refresh from a query in the same workbook.

I have added VB macro to it but this will not work in sharepoint online. because of its extension .xlsm

Is there another way other than macro and VB to have the pivot table refresh automatically in real time?

Thank you,