Where should I save some permanent information?

If you can automatically generate the excel file you can automatically generate a dataset tag.

1 Like

Consider storing a XLSX file with just the first page in the gateway's filesystem. Then your Apache POI script can read that in, add the second page, and write or otherwise deliver as a new file.

1 Like

You could always keep this in memory tag(s) or a UDT and loop through it as part of your Excel processing.

You can see how @pturmel brought in multiple sheets in this tool Index of /SpreadsheetImportTool

I agree with this also. If it's a pure scripting project, and you just want to import the project, then make it a separate function call that builds the first page with all the static text and formatting you want. Since you want it as part of the project, you can't store it as part of a tag, database, or external file. So the easiest is to just build it into a script.

2 Likes

In one of the projects I’m working on, I added a “patch” file to the script library.
It contains a copy of the patch logs, and a function to return the logs for a version.
The logs themselves are just a triple quote string at the top level of the module.
Then I can just call the function from a perspective page to display the latest changes (in a markdown component, the logs are formatted for this)

I’d prefer if I could just read these logs from an external file, but it’s impractical in my situation.

Maybe this can give you ideas ?

3 Likes

It is a project to manage a provider.

You import the project, manage whatever you need, and then you could remove the project.
It is like a tool, so you shouldn't need any configuration.

If you want I could dm you more about what I'm doing.

I'll probably do this. I'll add a script file that works as a "storage".
I think is the easiest way of doing it so when importing/exporting the information doesn't get lost.

Thanks to everyone that helped me! I trully appreciate it <3