Hi community, I'm new to power automate and office script - I'm hoping you can help
I am writing an office script to create a table in excel. When testing it in power automate it fell over because there was already a table in the file. To get round this I would like to check if there is a table and if so convert it to a range.
Here is my script so far:
It works if there is an existing table but doesn't when there isn't one present.
I found this where it it says it is possible to verify if an object is present but I do not know where to place the ? operator.
Can you help please?
This works - I was dropping the period rather than keeping it.
Thank you for taking the time to reply, I appreciate it.
here
existingTable?.convertToRange();
Note that the best practices article you linked to also mentions you should use absolute sheet addressing.
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional