<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />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.
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);
);