How can read local excel from designer?

If the button is in Perspective, then the script is running on the gateway, not wherever the Perspective session is. This is a fundamental limitation of Perspective's architecture. You cannot access local files on the client machine from Perspective, because that would be behavior indistinguishable from malware.

If you want to process a file the user provides in Perspective, the only option is the file upload component.

I'll also make a quick note here and say that you should not trust LLMs to help you write Ignition code.

system.util.getStackTrace

There is not and has never been a system.util.getStackTrace function. Already you are being set up for failure with an LLM, because it's going to happily throw lots and lots of unnecessary code at you that only makes it harder to understand what's going on.

Here's a ready made script you can adapt, graciously provided by @JordanCClark:

6 Likes