Excel to Trio Via MSE script

Novacane89

Member
Hi Friends,

I am testing a little script for a client and wanted to share it here in-case it could be useful. Not the final yet. Basically what it does is it looks at a specific Excel file then from the info in the excel file it will figure out which trio show to select, which data page to select by page number and then
update that specific trio page data with what ever data you specified on the excel from row 3 onwards. Column 1 # numbers are your exposed control IDs and Column 2 will be the data that will be set to that field.

The exe looks at a specific local root based EXCEL FILE named "excelFile.xlsx".
1- Set the config.ini to your trio MSE host IP.
2-In the excel file you match to the trio show name and the page number along with the control field ID's. *Please keep the # in place
3- Test by running the ExcelToTrio.exe script. (you should see the trio page gets updated with the data instantaneously in trio)

It is compressed with WinRar


example excel included and present in the needed root directory of the script for now.

I will post a final workable version once sorted. The Next phase will be a console app that runs and will watch a folder then auto update templates based on multiple excel files in a directory based on their modification that triggers the event.

*NB: This has been tested with MSE 4.0
*EXCEL does NOT need to be installed for the script to work. :).

Best Regards
 

Attachments

  • excel.PNG
    excel.PNG
    44.6 KB · Views: 10
Last edited:
Here is the final as the client wanted it. This version you run and leave it open. just minimize. It will look into a target folder specified in the config file. Then it will read all excel files in that target directory. Each excel file will tell the script what trio show and trio page it needs to populate. it will constantly update the trio pages from the excel files according to a Update_Interval you set in the config file.

steps to use.

1. Set config file. Only 3 params. My example below
HOST=10.10.3.162 <- hard coded to 8580 port. Just need to edit IP of trio MSE.
WATCH_FOLDER=test <- this is looking at a local "test" folder next to the script. to read the excel files. change as needed.
INTERVAL=15 <- update interval in seconds.

2.Prep your excel file or files that will populate content for a trio page.
* avoid using (A,1 & 2) and also (B, 1 & 2) these are reserved for the trio show and page details. All the other cells are free to use.
*The Excel file uses 2 sheets. (Data Sheet 1) & (Controls Sheet2).
*associate control fields with data to be inserted.
*-> If you want to populate control ID #0101 for example... you will insert #0101 anywhere on control sheet. (except for trio details area) then you just go to the Data sheet and put the textdata you want to send to that control field in trio on the same location[row,col] on Data sheet as you used for the control on the control sheet

3. Run the script and minimize, edit your excel files. close then afterwords. Trio pages will automatically sync.
I have provided example excel files in the download.

*bonus feature, On an excel sheet. If you add multiple datapages using "," as delimiter it will attempt to populate multiple data pages with the given data set.

This solution seemed to fit that specific client's workflow .

The script is downloadable from the same location as above. just download the second project. ".net5 - Final.rar"

Best Regards
Graham
 

Attachments

  • ControlSheet Corresponding Cells.PNG
    ControlSheet Corresponding Cells.PNG
    14.6 KB · Views: 6
  • DataSheet Corresponding Cells.PNG
    DataSheet Corresponding Cells.PNG
    19.6 KB · Views: 6
Back
Top