PDA

View Full Version : Excel Data into Maya


atzfratz
07-17-2009, 08:53 AM
Hello guys,

Does anyone know a script to import data from a csv-file,excel, matlab or anything like that as keys into maya?

I have the time values in the first column and the values for the keys in the second. any ideas?

Thanks
atzfratz

gozzer
07-17-2009, 11:24 AM
Well, reading from a csv files is definitely easier than reading an xls(x) file.

Since a csv file is basically a textfile, and all values separated by commas, you can read line by line and split the string into an array. Just open the file and find the patterns you are after, use whatever you're happy with as the delimiter for the stringToStringArray split parameter.

Cheers,
Daniel

ndufort
07-17-2009, 08:26 PM
There are a few modules outthere. I haven't tried it, but I just found this one:

http://www.python-excel.org/

http://code.activestate.com/recipes/483742/
http://gizmojo.org/code/readexcel/ (revision of above class)


For CSV data, you can import the csv module or read it as a text file.

http://docs.python.org/library/csv.html

If you are on MS Windows:
http://code.activestate.com/recipes/440661/

CGTalk Moderation
07-17-2009, 08:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.