[ANSWERED] How to dynamically work and display data with an .xls file
-
Hello everyone! I'm working on my interactive performance and I need to connect an .xls file to Isadora. I've followed everything on the Data Array actor and I've found it exceptional BUT I've a little problem with it. I have to modify dynamically my excel file that changes some of my values in real time. So I do like this:
1. I create my txt file using excel that I mantain open to modify irt.
2. I do a modification in excel.
3. The file changes its numbers inside (also in the txt, I can see the modification).
4. When I read the file using Data Array, Isadora don't change and it stays the same as before.
5. After a loooot of tries, I understood that closing Excel, and clicking on read of the Data Array, Isadora finally changes the numbers as expected.So it appears (and I don't know why) that Isadora has a sort of collision with open files in Excel. It allows modifications irt using Block Notes, but sadly I need the calculations that the Excel provides. What can I do to modify dinamically the numbers and make it change on Isadora screen?
Here you can find a simple image of the structure but I don't think there's something useful from it. Thanks dear community!
-
How are you updating the TXT file? Are you using save or save as? Save might leave the TXT owned by Excel... where save as will not. (just a guess, but possible)
-
I think the issue is that Excel keeps a backup copy of your current file open, so, as @DusX says, it doesn't 'release' it.
Try saving the file as an "Excel 97-2003 workbook" which is an .xls rather than an .xlsx file, and see if that works.
And if that doesn't work try saving as a .cvs file instead.
Let us know how you get on.
HTH
Mark (not that Mark) -
@a_anglani said:
After a loooot of tries, I understood that closing Excel, and clicking on read of the Data Array, Isadora finally changes the numbers as expected
To me, this is the way I'd expect it to work. I wouldn't want to have the same file open in two programs at once because I'd expect that there would be a high probability of some sort of interference as they'd both be trying to access the file at the same time.
@a_anglani said:
So it appears (and I don't know why) that Isadora has a sort of collision with open files in Excel.
I could be wrong but I don't think that this problem is specific to Isadora. If you try to open the same file in two programs at once, I don't think that they can both simultaneously edit it.
@a_anglani said:
I need the calculations that the Excel provides
You could try to perform the same calculations within Isadora using JavaScript. Another possibility is that you could make the excel document into a Google Sheet and then use the Get/Post URL Text actor to recall the information you need in Isadora.
-
I have replied to your support ticket with this information as well, but for anyone else wanting to know.
I was able to confirm that Excel and Calc both lock the file from reading by the Data Array. Calc (Libre Office) has a 'save a copy' feature that can be used to maintain a copy which is readable and will allow editing in both (one in Calc, and one from Isadora).This solution is not the easiest, so I also looked into a Javascript solution I used previously.
Using Javascript and the Papaparse library, it is possible to work on a CSV file in Excel and load the data from Isadora without making a copy. This solution converts the CSV into JSON in Isadora for usage.I have attached an example file.
-
@dusx YES we DID it!
I'm so happy, thanks to you all! I downloaded the load-n-parse_js plugin and tweaked it a little. Having the papaparse.min.js connected to my .csv, that I create with Excel starting from a xlsx and "saving as" a .csv, and using the Javascript reader connected with the JSON parser, I can extract the data from the csv despite being open in Excel, so bypassing Office (and LibreOffice, etc etc) lock to an open Calc file! Yes! Love this community.
-
Glad I could help.
Perhaps I should spend a little time cleaning this example up and offer it via the Add-Ons page. -
@dusx said:
Perhaps I should spend a little time cleaning this example up and offer it via the Add-Ons page.
Yes please <3
-
@dusx said:
<p>@a_anglani</p><p>Glad I could help. <br />Perhaps I should spend a little time cleaning this example up and offer it via the Add-Ons page.</p>
Hi Ryan,
That would be great, including the real basics for those of us who are javascript illiterate. I got lost with how to use the Papaparse library...
Thanks a lot
Mark (not him)