Ask Your Question

How to share files across worksheets ?

asked 2011-06-02 07:27:23 +0200

Pedro gravatar image

updated 2011-06-16 15:24:46 +0200

Kelvin Li gravatar image

I want that code in several worksheets, from the same user, work over the same files. The DATA variable works only for the worksheet that uses it in a cell.

More, inside a new package: how to produce a path to that common directory over all worksheets of an user ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-06-03 09:18:48 +0200

kcrisman gravatar image

updated 2011-06-09 15:43:12 +0200

This isn't possible with DATA, as you mention, unfortunately.

But there is the following workaround if you have permissions on your computer (for instance). I don't know whether this would work on a server, though presumably it might if you chmod the file in question appropriately?

Suppose you have a file you want to use at /Users/myusername/Downloads/List3000.sobj. Then

L = load('/Users/myusername/Downloads/List3000')

works in the notebook. I don't see any reason that as many worksheets as possible couldn't do that. You would need the full path, though.

The reason this works is because DATA just gives a full path as a string too:

sage: DATA


However, you can make a file accessible to other worksheets that you own by going to the Data dropdown menu, choosing the file, and then doing "create a linked copy to the worksheet" and choosing a worksheet. I don't know if this would help with your case or not.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-06-02 07:27:23 +0200

Seen: 556 times

Last updated: Jun 09 '11