Copying from excel

hello

a part of a script im trying to do is to take input from an excel sheet. the content of the excel sheet should be copied into the dynamo script, not linked to it.

what i usually do is that i copy all cells in excel after i add " and ; and then paste them into a code block like then i create a list and add inputs as the number of cells is copied, like so:

is there a better idea of doing it? its a tedious task if the amount is very big

Ideally you would read the data directly. This can be done and the content serialized into the graph so others don’t have to have access to the excel file by putting a gate between the file path and the xml based excel import node, and then put the contents into a Data.Remember node. Toggle the gate off and you’ll only feed out a single null to the Data.Remember, then save the graph. Content is in the file just as much as with your code blocks, but with the benefit of never having to copy/paste. For the gate I use a code block along the lines of this: update? filePath : null ;

For a copy-paste method, you could copy into a string node and split the string at new line characters.