Excel Script - Change dynamic/unknown Table name

SantaRow

New Member
Joined
May 31, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hey,
I have an Excel file where I run some Office Script. Can't use VBA/macros, since MS Power Automate doesn't support Excel macro files. In the Excel file. I already have some scripts running to do the following:
  • Create a new sheet every day
  • Change the name of the new sheet to the current day (yyyy-mm-dd)
  • Copy a table from a static sheet (another sheet I have in the file, that doesn't change) and inserting it into the newly created sheet
My flow in Power Automate then needs to be able to pull data from that newly created sheet and table. But to do that, it would need the name of the table. And that name changes at every new sheet and table created.
For that, thought it might work with having a script that changes the name of the newly created table to the current day, and with a letter first (since table names has to start with a letter). like; t31.05.2022.


My Power Automate flow is for having data pulled from the excel file and inserted into a MS List. But I can't pull the data from the excel file without knowing the name of the specific table.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
EDIT:

Hey,
I have an Excel file where I run some Office Script. Can't use VBA/macros, since MS Power Automate doesn't support Excel macro files. In the Excel file. I already have some scripts running to do the following:
  • Create a new sheet every day
    1654002443238.png

  • Change the name of the new sheet to the current day (yyyy-mm-dd)
    1654002427684.png
  • Copy a table from a static sheet (another sheet I have in the file, that doesn't change) and inserting it into the newly created sheet
    1654002440809.png
My flow in Power Automate then needs to be able to pull data from that newly created sheet and table. But to do that, it would need the name of the table. And that name changes at every new sheet and table created.

For that, thought it might work with having a script that changes the name of the newly created table to the current day, and with a letter first (since table names has to start with a letter). like; t31.05.2022.
It could be incorporated into my "Copy a table..." script, but haven't had any success with renaming the table.
Does any have a good idea for dynamically renaming a table into a static letter + the current day?
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,988
Members
448,538
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top