Notifications
Clear all

[Closed] importing data from excel

This is code I copied from another thread except that I replaced .dat w/ .csv

in_name = “C: est.dat”
in_file = openfile in_name
with animate on
(
while not eof in_file do
(
slidertime = slidertime + 5 – need to account for time values somehow: could also read in
x = readvalue in_file
y = readvalue in_file
z = readvalue in_file
skiptonextline in_file
$box01.position = point3 x y z
)
)

These are the errors that I get

No ““eof”” function for undefined <<
for “C: est.csv”

Then I took out the eof bits and got
No ““readValue”” function for undefined

I’m extremely new to maxscript and pretty sure there’s some minor detail I’m missing. Can anyone shed some light on what’s up w/ that?

3 Replies

To anyone reading this someone told me that in the line c: est.csv

I need c:\ est.csv because apparently does something else.

 JHN
 stands for a tab character in a string.

You can also use:

@"c:	est.dat"

With @ you don’t need to escape characters in a path string.

-Johan

Cool Thanks