<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Copying PNG images from JMP file to Excel in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Copying-PNG-images-from-JMP-file-to-Excel/m-p/251539#M49393</link>
    <description>&lt;P&gt;I am trying to copy the data from JMP file into Excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;When I run the script the data get copied into the Excel but when I open the excel file it shows some garbage value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me with this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_0-1583853573635.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22276iE9B77249396302B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_0-1583853573635.png" alt="Jacksmith12_0-1583853573635.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_1-1583853600602.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22277i3476D46BBCDD3781/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_1-1583853600602.png" alt="Jacksmith12_1-1583853600602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "C:\Jay\JMP\JMP data\Images.jmp" );  
OutputFolder = "C:\Jay\JMP\JMP data\Test.xlsx";

ColNames = dt &amp;lt;&amp;lt; Get Column Names("String"); 

DesColumnsList = {"pics"}; 
&lt;BR /&gt;for(i = 1, i &amp;lt;= N Cols(dt), i++,
		If(Contains(DesColumnsList,ColNames[i]),
				Col = Column(dt,i); // Get Reference for Column 
				Col &amp;lt;&amp;lt; Set Selected(1); 
		  );
   );
   
dt_New = dt &amp;lt;&amp;lt; Subset(Selected Rows(0),Selected Columns(1));  

Close(dt_New,Save(OutputFolder || "Test.xlsx"));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:26:19 GMT</pubDate>
    <dc:creator>Jackie_</dc:creator>
    <dc:date>2023-06-09T23:26:19Z</dc:date>
    <item>
      <title>Copying PNG images from JMP file to Excel</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-PNG-images-from-JMP-file-to-Excel/m-p/251539#M49393</link>
      <description>&lt;P&gt;I am trying to copy the data from JMP file into Excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;When I run the script the data get copied into the Excel but when I open the excel file it shows some garbage value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me with this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_0-1583853573635.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22276iE9B77249396302B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_0-1583853573635.png" alt="Jacksmith12_0-1583853573635.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_1-1583853600602.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22277i3476D46BBCDD3781/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_1-1583853600602.png" alt="Jacksmith12_1-1583853600602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "C:\Jay\JMP\JMP data\Images.jmp" );  
OutputFolder = "C:\Jay\JMP\JMP data\Test.xlsx";

ColNames = dt &amp;lt;&amp;lt; Get Column Names("String"); 

DesColumnsList = {"pics"}; 
&lt;BR /&gt;for(i = 1, i &amp;lt;= N Cols(dt), i++,
		If(Contains(DesColumnsList,ColNames[i]),
				Col = Column(dt,i); // Get Reference for Column 
				Col &amp;lt;&amp;lt; Set Selected(1); 
		  );
   );
   
dt_New = dt &amp;lt;&amp;lt; Subset(Selected Rows(0),Selected Columns(1));  

Close(dt_New,Save(OutputFolder || "Test.xlsx"));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:26:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-PNG-images-from-JMP-file-to-Excel/m-p/251539#M49393</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-09T23:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Copying PNG images from JMP file to Excel</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-PNG-images-from-JMP-file-to-Excel/m-p/251647#M49408</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17878"&gt;@Jackie_&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is a really good question, and I did some searching, but couldn't find a scripting way to evaluate the blob (which is what is written into the excel cell), into an image as it's saving the data table as an excel file. Instead, you can save each individual image in the output directory and then insert them with Excel individually. I tried that with the Big Class Families.jmp file and got this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snap1.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22279iF07361A7AD45D165/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snap1.png" alt="Snap1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; You might be able to write a Powershell file or some other non-JMP code that loops through the number of rows in the excel file to insert pictures at the appropriate cell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here's the code I was playing with to at least get you started -- based on your original section of code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$Sample_Data/big class families.jmp" );  
OutputFolder = "\Desktop\test"; //or wherever you are saving things

ColNames = dt &amp;lt;&amp;lt; Get Column Names("String"); 

DesColumnsList = {"pics"}; 
for(i = 1, i &amp;lt;= N Cols(dt), i++,
		If(Contains(DesColumnsList,ColNames[i]),
				Col = Column(dt,i); // Get Reference for Column 
				Col &amp;lt;&amp;lt; Set Selected(1); 
		  );
   );
   
dt_New = dt &amp;lt;&amp;lt; Subset(Selected Rows(0),Selected Columns(1));  

Close(dt_New,Save(OutputFolder || "\Test.xlsx"));

For (k=1, k&amp;lt;=N Rows(dt), k++,
dt:picture[k]&amp;lt;&amp;lt;Save Image(OutputFolder || "\image"||char(k)||".png");
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; It's really the last For loop that does anything new for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I don't know how to automate getting the images INTO excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully this is a start!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 19:26:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-PNG-images-from-JMP-file-to-Excel/m-p/251647#M49408</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2020-03-10T19:26:29Z</dc:date>
    </item>
  </channel>
</rss>

