cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Open File Error

I have a JSL script (JMP 9) that works on csv files in a directory. The script works fine if its in the same directory as the csv files. It gives a 'unable to open file' error if its not in the same directory as the csv files. Can someone tell me what I am doing wrong?

Preview Text Error: Unable to open file.

Import Text: Unable to determine delimiters.

Tried to open: /M:/OV9760/xyz.csv

Cannot open table in access or evaluation of 'Open' , Open( files1 )

In the following script, error marked by /*###*/

dir1 = Pick Directory( "Select the folder where csv files are located" );

openDTs = {};

files1 = Files In Directory( dir1 );

start = Tick Seconds();

For( i = 1, i <= N Items( files1 ), i++,

    If( Ends With( files1, ".csv" ),

        Open/*###*/(files1);

         dt1 = Current Data Table();

-------------------------------------------------

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Open File Error

I think the directory is not remembered or implicit in Open(), i.e. the path has to be included.

...

Open(dir1||files1[i]);

...

View solution in original post

1 REPLY 1
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Open File Error

I think the directory is not remembered or implicit in Open(), i.e. the path has to be included.

...

Open(dir1||files1[i]);

...

Recommended Articles