Subscribe Bookmark RSS Feed

Problem facing while reading document from C# Visual studio

ORANALYST17

Community Member

Joined:

Jul 12, 2017

class Program
{
static void Main(string[] args)
{
JMP.Application myjmp;
myjmp = new JMP.Application();
JMP.Document doc;

doc = myjmp.OpenDocument("data.xlsx");

JMP.Distribution dist;
dist = doc.CreateDistribution();
}
}

 

I am getting doc as null. even I have tried to read .jmp data file but still i am getting null. I am new in JMP. Please help me out.

1 REPLY
briancorcoran

Joined:

Jun 23, 2011

Have you tried fully qualifying the path to the file, like

 

doc = myjmp.OpenDocument("c:\\program files\\sas\jmp\\13samples\\data\\data.xlsx");

 

Please notice that for C# you need \\ for slashes in the path.

 

There is a C# example that ships with JMP.  For JMP 13, you would find this in C:\Program Files\SAS\JMP\13\Samples\Automation\Visual C# Sample\JMPStarter .

 

Looking at the sample should give you a good idea how to do most automation operations with C# and JMP.

 

Brian Corcoran

JMP Development