Message Boards Message Boards

[✓] Use variables from different notebooks in another notebook?


Hey guys,

I have 24 notebooks (file1, file2, file3,...) and each one makes a lot of operations which leads in the end to 3 variables a,b and c.

Now I have to use all this 24 a,b and c's to make more calculations in a new notebook file (file_finish).

So I thought if there might be a possibilty to import variables from other notebooks. Something like:

a1 = Import[[Evaluate[file1], variable{a}]
b1 =Import[Evaluate[file1], variable{b}]
c1 =Import[Evaluate[file1], variable{c}]
a2 =Import[Evaluate[file2]}, variable{a}]

and so on.

Of course this code does not work at all, it should just represent the operations I'd like to do. Can you guys help me out?

Best regards, Tobias

POSTED BY: Tobias Mitterdorfer
1 year ago

I would save the results to files (mx, wdx, json, ....), then Import them all using Map.

POSTED BY: Sander Huisman
1 year ago

Does anyone think we can use PersistentValue or PersistentObject for this?

POSTED BY: Sam Carrettie
1 year ago

Group Abstract Group Abstract