How can I get only one sheet of excel file as JMP data table?

Aug 18, 2016 10:46 PM(4124 views)

Hi,

I am using below VBA to get JMP data table from excel file. The problem is that JMP takes all sheets of the excel file as data table but i need JMP to get only one specific sheet (i.e. sheet1) as data table. I appreciate your help to solve it.

Re: How can I get only one sheet of excel file as JMP data table?

Unfortunately, it's kind of an all or nothing with RunCommand. Once you use JSL, you must use all JSL. There is also the RunJSLFile if you can encapsulate all of your operations in JSL. It's not possible to mix and match automation objects and JSL references, outside of looking at display tree elements.

Re: How can I get only one sheet of excel file as JMP data table?

The full Excel Wizard JSL interface hasn't been built into Automation, but is still available to you via the RunCommand method in Automation. You could do something like this (I successfully used this just now):

In general, you can use the Excel Wizard within JMP to open any Excel workbook to your specifications, and then you can take the Source script in the resulting JMP data table and use it in RunCommand. I hope this helps.

Re: How can I get only one sheet of excel file as JMP data table?

Thanks Brian. It works now and opens one sheet as JMP document. The new issue is how to assign a variable to this opened document and run FitModel command. Before using RunCommand, I assigned as follow:

Re: How can I get only one sheet of excel file as JMP data table?

Unfortunately, it's kind of an all or nothing with RunCommand. Once you use JSL, you must use all JSL. There is also the RunJSLFile if you can encapsulate all of your operations in JSL. It's not possible to mix and match automation objects and JSL references, outside of looking at display tree elements.

Re: How can I get only one sheet of excel file as JMP data table?

Ok noted with thanks Brian. Your responses were quick and really useful. I should be appreciative for your time. I am developing a forecasting interface by connecting JMP and Excel and may bother you in future for more helps .