cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Extract Report Data and Export it to Excel

I am totally new to the JMP community and have a limited coding background. I am working with Life Distributions (Weibulls mostly), and I would like to create an Add-in that can do the following tasks once I have selected the best distribution fit:

1. Save specific report data from distribution (see the data tables in red)Capturesss.PNGCapture.PNG

2. Export the data into an excel sheet

3. Have the add-in button available whithin report window?

HUGE THANKS! 

 

This is the report script behind the distribution and parameters I need within the code:

Life Distribution(
	Y( :event_age ),
	Censor( :event_type ),
	Censor Code( "S" ),
	<<Fit Weibull,
	Confidence Interval Method( Likelihood ),
	<<Set Scale( Weibull ),
	<<Suppress Plot( Nonparametric ),
	Interval Type( Simultaneous ),
	Show Event Plot Frequency Label( 0 ),
	<<Set Scriptables(
		{Probability Paper(
			Profiler(
				1,
				Confidence Intervals( 1 ),
				Term Value( event_age( 4.657084189, Lock( 0 ), Show( 1 ) ) )
			)
		), Weibull Distribution(
			Profiler( 1, Confidence Intervals( 1 ), Term Value( event_age( 4.6571, Lock( 0 ), Show( 1 ) ) ) )
		), Weibull Quantile(
			Profiler( 1, Confidence Intervals( 1 ), Term Value( Probability( 0.5, Lock( 0 ), Show( 1 ) ) ) )
		), Weibull Hazard(
			Profiler( 1, Confidence Intervals( 1 ), Term Value( event_age( 4.6571, Lock( 0 ), Show( 1 ) ) ) )
		), Weibull Density(
			Profiler( 1, Confidence Intervals( 0 ), Term Value( event_age( 4.6571, Lock( 0 ), Show( 1 ) ) ) )
		), Custom Estimation( Weibull, 1, Estimate Probability( 5, 10, 15, 20, 25, 30, 35, 40 ) )}
	),
	SendToReport(
		Dispatch(
			{"Compare Distributions"},
			"Life Distribution",
			FrameBox( 2 ),
			{Grid Line Order( 2 ), Reference Line Order( 3 )}
		),
		Dispatch(
			{"Compare Distributions"},
			"Distribution Profiler",
			OutlineBox,
			{Set Summary Behavior( "Collapse" )}
		),
		Dispatch( {"Statistics"}, "", ListBox, {Set Summary Behavior( "Collapse" )} )
	)
);

 

2 REPLIES 2
RichardSlack
Level II

Re: Extract Report Data and Export it to Excel

Hi, I am trying to do something similar so my reply here is just to link me to this question in case you get a great answer!

Re: Extract Report Data and Export it to Excel

cr=current report();
weibulltable=cr<< XPath( "//OutlineBox[text() = '"||"Parametric Estimate - Weibull"|| "']" );

//grab the first instance of the table and 'make combined' if other results are needed
weibulltable=cr<<XPath("//OutlineBox[text()='Statistics']//OutlineBox[text()='Parametric Estimate - Weibull']//NumberColBox[NumberColBoxHeader[text()='Estimate']]");
weibulldt=weibulltable[1]<<make combined data table;

estimate_prob_table=cr<< XPath("//OutlineBox[text()='Statistics']//OutlineBox[text()='Parametric Estimate - Weibull']//OutlineBox[text()='Estimate Probability']//NumberColEditBox[NumberColEditBoxHeader[text()='event_age']]");
estimatedt=estimate_prob_table[1]<<make combined data table;

//column selections are different between v18 and 19, the script below would work on yours, 19 is different
estimatedt<<clear column selection;
estimatedt<<select columns("event_age", "Failure Probability", "Failure Probability Upper 95% (Likelihood)", "Failure Probability Upper 95% (Likelihood)")//select columns you need to delete
estimatedt<<invert column selection;
estimatedt<<delete columns();

This will get you to having both of those as individual JMP tables that you can then export, you can put this script into a custom toolbar and have it available when the report is open.

“All models are wrong, but some are useful”

Recommended Articles