cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Export Data Table to HTML

The attached script can be used to write the contents of the current data table in HTML format.

It has been updated to support image columns with help from @JohnPonte.

 

I added a 'destinationPath' variable to make it easier to change the destination folder. Images will be stored in the destination folder in JPEG format regardless of the original source of the images. If the generated HTML file is copied to another folder, the image files will also need to be copied to that folder. There's no attempt to prevent images from one export from overwriting images required for a previous export, so it would be best to change the destination or copy files out of the destination directory before exporting another table.

 

Images can be large, so the display of images is limited to 100 pixels high. This limit can be changed with the 'maxImageHeight' variable.

 

Here's how it looks with the SAS Offices sample data table:

WebTableWithImages.PNG

Here's how it looks with the Big Class sample data table:

6970_WebTable.PNG

I was inspired by Craige@JMP  comments in Capturing the log file during a non interactive JMP script session​ and his blogs: Fast List​ and Progress Bar.

 

I fixed a problem with Date columns not rendering well. Unfortunately, my fix uses a JSL API only supported in JMP 12 and above. If there's interest, I'll work on an update that also runs in JMP 11.

 

I also gave the output a facelift with some simple styling. Here's the Hurricanes.jmp table as a web page with the cursor hovering over the third row:

11363_HurricanesWebTable.PNG

Craige asked if I could make the header row "sticky" like it is in JMP. Since it looked like a little more work than I was willing to take on in my spare time, I decided to provide hover labels instead. So when you scroll way down, you can still tell what column a cell belongs to by hovering over the cell. There are two different hover label implementations in the script. The one that is not commented out minimizes file size and exports faster, by running a bit of JavaScript when the page loads.

Comments
ron_horne

Hi @John_Powell_JMP 

This is very usefull thank you.

Will the next version of this allow exporting with pictures? now that data table cells can handel pictures it would be very usefull.

Hi @ron_horne

 

I thought about that, but didn't have the time and wasn't sure if it would be used. Now that you've given me some motivation, I will try to find the time.

 

Thanks, 

~John

 

Hi @ron_horne

 

This update supports pictures thanks to some help from @JohnPonte .

Please read my notes above and let me know if you run into any trouble using it.

 

Thanks, 

~John

P.S. You'll need to unzip the attachment to open it in JMP.

ron_horne

Thank You @John_Powell_JMP ,

this is a substantial upgrade. highly appreciated.

Ron