cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

Can JMP open .zip archive contents?

Hello,

I have a .zip archive with some tab delimited data saved as text files inside.  I am wondering if there is a way JMP can open one of these text files as a data table directly from the .zip file.  Based on the documentation I'm reading it sounds like this might be possible:

http://www.jmp.com/support/help/Utility_Functions.shtml  --> see Open() and the Zip arg

http://www.jmp.com/support/help/Other_Objects.shtml#1931138

For some reason I cannot figure out the syntax for this, does anyone know more?

I have a path to the .zip file on my local pc and a name of one of the text files I would like to import.  For sake of example let's call them:

path = C:\ZipArchive

file = test1.txt

Any help would be greatly appreciated.  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: Can JMP open .zip archive contents?

I got some code from Peter W a while back that will do what you want.  To make this work, save a few text file datasets (e.g. csv format) into Big Class.zip.  Then run the following code:

zipdt = open("c:\temp\Big Class.zip", Zip);

zip_member_list = zipdt << dir;

// Open each member file

for (i = 1, i <= nitems(zip_member_list), i++,

      zip_file = zipdt << read(zip_member_list[i], format(blob));

// Open the file

      dt = open(zip_file, text);

);

View solution in original post

2 REPLIES 2
pmroz
Super User

Re: Can JMP open .zip archive contents?

I got some code from Peter W a while back that will do what you want.  To make this work, save a few text file datasets (e.g. csv format) into Big Class.zip.  Then run the following code:

zipdt = open("c:\temp\Big Class.zip", Zip);

zip_member_list = zipdt << dir;

// Open each member file

for (i = 1, i <= nitems(zip_member_list), i++,

      zip_file = zipdt << read(zip_member_list[i], format(blob));

// Open the file

      dt = open(zip_file, text);

);

poweruser87
Level I

Re: Can JMP open .zip archive contents?

Works great.  Thanks!

Recommended Articles