<?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 Can JMP Support Excel Formatting through JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86355#M38495</link>
    <description>&lt;P&gt;All,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Going through several different posts in the community on the topic, I believe I know the answer to my question. However, I will still go ahead and summarize the issue and see if anyone else has gone down this path.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;U&gt;&lt;STRONG&gt;&amp;nbsp;Problem Statement&lt;/STRONG&gt;&lt;/U&gt;: Generate an Excel Workbook in a previously accepted and recognized template&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;U&gt;&lt;STRONG&gt;&amp;nbsp;Not for Debate&lt;/STRONG&gt;&lt;/U&gt; : Why is Excel the chosen format of output&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; In going through the following posts :&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Excel-Table-Formatting/m-p/33650#M19957" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Excel-Table-Formatting/m-p/33650#M19957&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.jmp.com/t5/Martin-Demel-s-Blog/JMP-and-Excel-A-Never-ending-story-Part-2-cont/ba-p/35941" target="_blank"&gt;https://community.jmp.com/t5/Martin-Demel-s-Blog/JMP-and-Excel-A-Never-ending-story-Part-2-cont/ba-p/35941&lt;/A&gt; (and all the relevant blog posts on topic)&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.jmp.com/t5/Discovery-Summit-2016/Working-With-Excel-the-Advanced-Edition/ta-p/23969" target="_blank"&gt;https://community.jmp.com/t5/Discovery-Summit-2016/Working-With-Excel-the-Advanced-Edition/ta-p/23969&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;Understandably a lot of focus is on how to import and export data between Excel and JMP. However, none of them really speak about preserving/customizing the format of the data that is exported from JMP and Excel. Whether we like it or not, Excel is still going to be around and there will be a continuous need for presenting our results via Excel (least of which is every user cannot have a JMP license).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given that background, I have an Excel template and I would like to edit some data in the Excel template using &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;JSL&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; preferably. This is the last step of a really large application that I have in JMP. Ideally, all I need is for JMP to edit the data in the template and save the workbook. Unfortunately, as you can expect the minute I open the file in JMP, the formatting goes for a toss and leaves me with a garbled format which is not really presentable to the user.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So,&amp;nbsp;&lt;BR /&gt;&amp;nbsp;1. Is there a way using JSL not VBA to preserve the formatting in an Excel Template and edit the data in the file ?&amp;nbsp;&lt;BR /&gt;&amp;nbsp;2. Assuming the answer to my previous question is "No", I have gone down the path of using "XLConnect" package in R. However, that is also running into troubles. I don't expect the JMP community to address questions on why the R package is not yielding the results. Should anyone be interested in helping, the R code is provided below.&amp;nbsp; Also attached is an example template that I am experimenting on&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;# Clear Console and screen 
cat("\014") # Clear Console 
rm(list = ls(all = TRUE)) # Clear Workspace
options(java.parameters = "- Xmx1024m")

# Load desired packages
suppressPackageStartupMessages(library(XLConnect))

# Define FilePaths 
FolderPath &amp;lt;- "C:\\Users\\Temp\\Desktop"
TemplateFilePath &amp;lt;- paste(FolderPath, "LoanTemplate.xlsx", sep = "\\")
OutputFilePath &amp;lt;- paste(FolderPath, "MyLoan.xlsx", sep = "\\")
OutputFilePath1 &amp;lt;- paste(FolderPath, "MyLoan1.xlsx", sep = "\\")
OutputFilePath2 &amp;lt;- paste(FolderPath, "MyLoan2.xlsx", sep = "\\")

# Read Data 
TemplateData &amp;lt;- readWorksheetFromFile(TemplateFilePath, sheet = 'Loan Schedule', header = T)
MyData &amp;lt;- TemplateData
MyData[[4]][2] &amp;lt;- 10000

# Set Style Action 
setStyleAction(wb, XLC$"STYLE_ACTION.NONE")

# Trial 1
writeWorksheet(OutputFilePath, MyData, 'Loan Schedule', styleAction = XLC$STYLE_ACTION.XLCONNECT, clearSheets = TRUE)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="hljs-comment"&gt;# Trial 2&lt;/SPAN&gt;&lt;SPAN&gt; &lt;BR /&gt;writeWorksheetToFile(OutputFilePath1, MyData, &lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;'Loan Schedule'&lt;/SPAN&gt;&lt;SPAN&gt;, styleAction = XLC$STYLE_ACTION.XLCONNECT, clearSheets = &lt;/SPAN&gt;&lt;SPAN class="hljs-literal"&gt;FALSE&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="hljs-comment"&gt;#Trial 3&lt;/SPAN&gt;&lt;SPAN&gt; &lt;BR /&gt;writeWorksheetToFile(OutputFilePath2, MyData, &lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;'Loan Schedule'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Dec 2018 16:29:06 GMT</pubDate>
    <dc:creator>uday_guntupalli</dc:creator>
    <dc:date>2018-12-21T16:29:06Z</dc:date>
    <item>
      <title>Can JMP Support Excel Formatting through JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86355#M38495</link>
      <description>&lt;P&gt;All,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Going through several different posts in the community on the topic, I believe I know the answer to my question. However, I will still go ahead and summarize the issue and see if anyone else has gone down this path.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;U&gt;&lt;STRONG&gt;&amp;nbsp;Problem Statement&lt;/STRONG&gt;&lt;/U&gt;: Generate an Excel Workbook in a previously accepted and recognized template&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;U&gt;&lt;STRONG&gt;&amp;nbsp;Not for Debate&lt;/STRONG&gt;&lt;/U&gt; : Why is Excel the chosen format of output&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; In going through the following posts :&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Excel-Table-Formatting/m-p/33650#M19957" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Excel-Table-Formatting/m-p/33650#M19957&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.jmp.com/t5/Martin-Demel-s-Blog/JMP-and-Excel-A-Never-ending-story-Part-2-cont/ba-p/35941" target="_blank"&gt;https://community.jmp.com/t5/Martin-Demel-s-Blog/JMP-and-Excel-A-Never-ending-story-Part-2-cont/ba-p/35941&lt;/A&gt; (and all the relevant blog posts on topic)&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.jmp.com/t5/Discovery-Summit-2016/Working-With-Excel-the-Advanced-Edition/ta-p/23969" target="_blank"&gt;https://community.jmp.com/t5/Discovery-Summit-2016/Working-With-Excel-the-Advanced-Edition/ta-p/23969&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;Understandably a lot of focus is on how to import and export data between Excel and JMP. However, none of them really speak about preserving/customizing the format of the data that is exported from JMP and Excel. Whether we like it or not, Excel is still going to be around and there will be a continuous need for presenting our results via Excel (least of which is every user cannot have a JMP license).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given that background, I have an Excel template and I would like to edit some data in the Excel template using &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;JSL&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; preferably. This is the last step of a really large application that I have in JMP. Ideally, all I need is for JMP to edit the data in the template and save the workbook. Unfortunately, as you can expect the minute I open the file in JMP, the formatting goes for a toss and leaves me with a garbled format which is not really presentable to the user.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So,&amp;nbsp;&lt;BR /&gt;&amp;nbsp;1. Is there a way using JSL not VBA to preserve the formatting in an Excel Template and edit the data in the file ?&amp;nbsp;&lt;BR /&gt;&amp;nbsp;2. Assuming the answer to my previous question is "No", I have gone down the path of using "XLConnect" package in R. However, that is also running into troubles. I don't expect the JMP community to address questions on why the R package is not yielding the results. Should anyone be interested in helping, the R code is provided below.&amp;nbsp; Also attached is an example template that I am experimenting on&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;# Clear Console and screen 
cat("\014") # Clear Console 
rm(list = ls(all = TRUE)) # Clear Workspace
options(java.parameters = "- Xmx1024m")

# Load desired packages
suppressPackageStartupMessages(library(XLConnect))

# Define FilePaths 
FolderPath &amp;lt;- "C:\\Users\\Temp\\Desktop"
TemplateFilePath &amp;lt;- paste(FolderPath, "LoanTemplate.xlsx", sep = "\\")
OutputFilePath &amp;lt;- paste(FolderPath, "MyLoan.xlsx", sep = "\\")
OutputFilePath1 &amp;lt;- paste(FolderPath, "MyLoan1.xlsx", sep = "\\")
OutputFilePath2 &amp;lt;- paste(FolderPath, "MyLoan2.xlsx", sep = "\\")

# Read Data 
TemplateData &amp;lt;- readWorksheetFromFile(TemplateFilePath, sheet = 'Loan Schedule', header = T)
MyData &amp;lt;- TemplateData
MyData[[4]][2] &amp;lt;- 10000

# Set Style Action 
setStyleAction(wb, XLC$"STYLE_ACTION.NONE")

# Trial 1
writeWorksheet(OutputFilePath, MyData, 'Loan Schedule', styleAction = XLC$STYLE_ACTION.XLCONNECT, clearSheets = TRUE)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="hljs-comment"&gt;# Trial 2&lt;/SPAN&gt;&lt;SPAN&gt; &lt;BR /&gt;writeWorksheetToFile(OutputFilePath1, MyData, &lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;'Loan Schedule'&lt;/SPAN&gt;&lt;SPAN&gt;, styleAction = XLC$STYLE_ACTION.XLCONNECT, clearSheets = &lt;/SPAN&gt;&lt;SPAN class="hljs-literal"&gt;FALSE&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="hljs-comment"&gt;#Trial 3&lt;/SPAN&gt;&lt;SPAN&gt; &lt;BR /&gt;writeWorksheetToFile(OutputFilePath2, MyData, &lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;'Loan Schedule'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 16:29:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86355#M38495</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-12-21T16:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP Support Excel Formatting through JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86410#M38512</link>
      <description>&lt;P&gt;If you are running into problems with R, you might consider an alternative 'JMP only' route. Not sure how viable this would actually be.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
// .XLSX is a ZIP file
package = Open( "$DESKTOP/Loan Template.xlsx", zip );
// See what's in the package
dirlist = package &amp;lt;&amp;lt; dir;
Print(dirlist);
// Get the XML
xml = package &amp;lt;&amp;lt; read(dirlist[9]);
// Manipulate XML with JSL?
Print(xml);
// Update the package
package &amp;lt;&amp;lt; Write(dirlist[9], xml );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Dec 2018 10:25:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86410#M38512</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2018-12-24T10:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP Support Excel Formatting through JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86424#M38522</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6696"&gt;@uday_guntupalli&lt;/a&gt;&amp;nbsp;your needs are not clear.&amp;nbsp; If you have a template like the one you provided that has all the macro coding and formulas and you only need to change a few values, you can learn a few vbscript commands and use Run Program (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is a script that saves the JMP file Big Class as xslx and changes the format on one cell, to demonstrate how you might code this using JSL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not an expert with XML schema, so Ian's appraoch might be what you need.&lt;/P&gt;&lt;P&gt;JSL to change the Principal, number of days, interest rate and extra payment.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);

cmdList={"Dim xlApp",

"\[Set xlApp = CreateObject("Excel.Application")]\",
"xlApp.Visible = True",
"\[xlApp.Workbooks.Open ("C:\TEMP\Loan Template.xlsx")]\",
"'Change the values in cells e3-e5, e9", 
"\[xlApp.Range("E3").Select]\",
"\[xlApp.ActiveCell.Value = 10000]\",
"\[xlApp.Range("E4").Select]\",
"\[xlApp.ActiveCell.Value = .044]\",
"\[xlApp.Range("E5").Select]\",
"\[xlApp.ActiveCell.Value = 2]\",
"\[xlApp.Range("E9").Select]\",
"\[xlApp.ActiveCell.Value = 150]\",
"\[xlApp.ActiveWorkbook.SaveAs("C:\TEMP\Loan v2.xlsx")]\",
"xlApp.Quit"
	
};


vbsTxt = concat items(cmdList, "\!N"); //add new lines aka CR 

Save Text File( "c:\temp\jj2.vbs" , vbsTxt);


rp4 = RunProgram(Executable("wscript"),
	   Options("c:\temp\jj2.vbs"),
	   ReadFunction("text")
);

Caption( "JuMP has Control", Font( "Arial Black" ),  //u is added for spoken voice to say and not spelll JMP.
	Font Size( 16 ),
	Text Color( "red" ), Spoken(1)
);

wait(2);
Caption(Remove);

//look at the Excel file, the color coding is maintained for new payment schedule&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Dec 2018 08:25:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86424#M38522</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-12-25T08:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP Support Excel Formatting through JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86425#M38523</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/70"&gt;@gzmorgan0&lt;/a&gt;,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Using VBA in the simplified example does seem reasonable, however in my actual problem statement, I would need to modify multiple values and I would prefer to do it without VBA. I was able to get the R code to work and I am trying to see how to work with&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;suggestion as well. However, thank you for providing me with one more option. Merry Christmas.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Dec 2018 13:09:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86425#M38523</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-12-25T13:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP Support Excel Formatting through JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86453#M38536</link>
      <description>&lt;P&gt;This reply is not so much for&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6696"&gt;@uday_guntupalli&lt;/a&gt;&amp;nbsp;but for the blog in case this discussion has followers who would like to be able to save a JMP table in Excel with a more pleasant format where the column headers contain filters/slicers. The solution provided below only works on the simple case of saving&amp;nbsp;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;one&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt; JMP table in a .xlsx file.&amp;nbsp; The VBScript code would need additional code to find all sheets and create a for-loop wrapper to run on each sheet. I am not good at VBS and enlisted syntax help from my better half. If there is interest, post a comment and we'll extend the VBSCript.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how it works:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;save the attached file &lt;STRONG&gt;tblFmt.txt&lt;/STRONG&gt; to a path where you store programs that you use many times, rename it to have the extension .vbs&lt;/LI&gt;&lt;LI&gt;open the JSL file&amp;nbsp; &lt;STRONG&gt;CreateExcelTable_Style.jsl&lt;/STRONG&gt;&amp;nbsp; and change the path names for .vbs and the saved Excel file, if needed&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Items to note regarding the vbs code:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;It applies the built-in Excel &lt;STRONG&gt;TableStyleMedium6&lt;/STRONG&gt; to the table on the first sheet which produces dark blue headers, alternating light blue and white rows, and column filters (slicers).&lt;/LI&gt;&lt;LI&gt;The header font is changed to Arial Black, size 12, bold&lt;/LI&gt;&lt;LI&gt;The table is AutoFit to the EntireColumn. This might not be useful in all cases.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This VBS code can be called in any JSL program by modifying the path names in this JSL snippet&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Save("c:/temp/Biggie Class.xlsx");

//command line syntax: wscript path\tblFmt.vbs 'path to excel workbook'

rp4 = RunProgram(Executable("wscript"),
	   Options({"c:\temp\tblFmt.vbs", "\!"c:\temp\biggie class.xlsx\!""}),
	   ReadFunction("text")
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 529px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/14926i4AE7B1CC2D48977A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note to JMP Developers ( &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;) : I tried making Book.xltx my default Excel template. Either I was not successful, or JMP does not use it. If successful, my vbs code could have specified a custom table style.&amp;nbsp; A &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Wish List&lt;/STRONG&gt;&lt;/FONT&gt; item, might be an extension of Create Excel Workbook() to have optional arguments to specify the .xltx template file, and the TableStyle name that would apply a custom style to be applied.&amp;nbsp; I realize that gets into Excel versions, the issue of&amp;nbsp; 64 vs. 32 bit MicrosoftOffice, etc. This is not high on my list, but there seems to be frequent Excel table requests.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Dec 2018 23:53:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86453#M38536</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-12-26T23:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP Support Excel Formatting through JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86457#M38539</link>
      <description>&lt;P&gt;Here is the multi-sheet version, for the previous post. Note JMP 12 only allows saving a table to a single sheet Excel workbook.&amp;nbsp; JMP 13 enabled the function &lt;STRONG&gt;Create Excel Workbook()&lt;/STRONG&gt; but it required a list of JMP table names, not the table references. JMP 14 allows either a list of opened table names or table references.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how it works:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;save the attached &lt;STRONG&gt;file&amp;nbsp;multi_tblFmt.txt&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to a path where you store programs that you use many times, rename it to have the extension .vbs&lt;/LI&gt;&lt;LI&gt;If you are using JMP 12 or later with wscript (a PC not sure about a MAC), open the JSL file&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;CreateExcelTable_Style.jsl&lt;/STRONG&gt;&amp;nbsp; and change the path names for the .vbs file and the saved Excel file (save_path), if needed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It is interesting to note that the Excel template that JMP uses for:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;JMP v12 and JMP v13, TableStyleMedium6 is an Aqua color, and TableStyleMedium2 is Blue.&lt;/LI&gt;&lt;LI&gt;JMP v14 the TableStyleMedium6 is Blue.&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Edit the .vbs file with Notepad to specify the style you prefer. ( In Excel, Home &amp;gt;Format&amp;gt;Table ).&lt;/P&gt;&lt;P&gt;Final Note: The .vbs file contains an "IF" block of code that produces an interactive message. If running this script non-interactively, this if block should be removed or commented out.&amp;nbsp; See the .vbs file comment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 09:31:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86457#M38539</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-12-27T09:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP Support Excel Formatting through JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86485#M38559</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In the example you have shared, could you kindly elaborate on how one could edit the values in XML using JSL ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Dec 2018 22:17:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86485#M38559</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-12-28T22:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP Support Excel Formatting through JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/94892#M38766</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6696"&gt;@uday_guntupalli&lt;/a&gt;&amp;nbsp;there is an alternative to editing XML to edit Excel and save formatting and functions: use JMP functions to treat Excel as a database. I have only done this with sheets that have&amp;nbsp; database layout, that is, columns are fields and rows are records.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not an SQL expert, but you can find documentation on updating many database records with a table. I will provide a simple example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a picture of a simple Excel file with two sheets and with formatting.&amp;nbsp; The file is called &lt;STRONG&gt;suppliers.xlsx&lt;/STRONG&gt; and the sheet to be updated is named &lt;STRONG&gt;suppliers&lt;/STRONG&gt;. The book&amp;nbsp;&lt;STRONG&gt;JSL Companion, 2nd Edition&lt;/STRONG&gt;, documents three JMP ODBC methods: &lt;STRONG&gt;Open Database()&lt;/STRONG&gt;, &lt;STRONG&gt;New SQL Query()&lt;/STRONG&gt; and one the authors named a 3-step method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15014i36345F15004CB7E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This method can be used to execute any valid SQL statement.&amp;nbsp; Below is the script to change one record using the SQL &lt;STRONG&gt;UPDATE&lt;/STRONG&gt; syntax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dbc = create database connection("DSN=Excel Files; DBQ=c:\temp\suppliers.xlsx");

Execute sql(dbc, "SELECT * FROM `suppliers$` WHERE  supplier_name = 'Google' ", "READIT"); //example extraction

Execute sql(dbc, "UPDATE `suppliers$`
   SET supplier_id = 150,
    supplier_name = 'Apple',
    city = 'Cupertino'
   WHERE supplier_name = 'Google'");
   
close database connection(dbc);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Before the SQL script" style="width: 641px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15013iA6B9FD8FA1ADE843/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Before the SQL script" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Before the SQL script&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="After the SQL Update - red box drawn" style="width: 621px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15015i8AA17AB729CB5411/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="After the SQL Update - red box drawn" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;After the SQL Update - red box drawn&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note that the formatting is unchanged.&amp;nbsp; I cannot attest to the performance of a database UPDATE with another table, but system updates are typically pretty fast. You can do a web search for the proper SQL syntax. Note if you are interested in this method and have 32bit Microsoft Office, it takes a couple steps to complete the onetime setup of the Machine File connection (my machine connection to Excel is named&amp;nbsp;&lt;STRONG&gt;Excel Files&lt;/STRONG&gt;&amp;nbsp;).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is not the forum to discuss all of that. We (authors) wrote a supplementary document if you request it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From your last post, it seems you have an R method to do waht you want, so I was not going to reply, but decided for closure/alternatives to add another method into the mix.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jan 2019 12:29:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/94892#M38766</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-01-05T12:29:48Z</dc:date>
    </item>
  </channel>
</rss>

