cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar

HTML import as data table issue

I have been using the open() function for a HTML file. I'm now dealing with a column that has values such as "<2.4!". 

 

when I use the open() function, it imports those values as "" in the data table.

 

However, when I do it using prompts in JMP, after opening the html file, I'm able to open the html file using 'Import table as Data Table' and the correct value of "<2.4!" is imported.

 

Is there a way to script this so that those values are not missing?

 

Thanks for any help

4 REPLIES 4
Byron_JMP
Staff

Re: HTML import as data table issue

That would be interesting to look at. Could you post a portion of your HTML file or a link to it?

 

Perhaps you might have hard coded that that column should be numeric somehow? Since it is now character, all of the non numeric values become missing.

JMP Systems Engineer, Health and Life Sciences (Pharma)

Re: HTML import as data table issue

It's not coded any where that the column must be numeric. Here's the code for opening I'm using:

 

 




//open the data as a jmp data table
dtcd = Open(
<html file>,
"invisible",
HTML Table( 1, Column Names( 3 ), Data Starts( 4 ) ) 
);

 

Below is a portion of the html file:

 

Data

62.6
146.1
15015.8
17430.1
8304.4
1097.3
254.6
22.9
7363.7
7445.8
4011.8
54.0
0.7
6.5
3218.3
3254.2
2954.7
2437.0
<3.2!
<3.2!
1514.6

 

 

Jeff_Perkinson
Community Manager Community Manager

Re: HTML import as data table issue

Thanks for posting it as a table here. That means we can try importing it from here.

 

What is the result from this JSL for you?

 

Open(
	"https://community.jmp.com/t5/Discussions/HTML-import-as-data-table-issue/m-p/270810#M52714",
	HTML Table( 1, Column Names( 0 ), Data Starts( 1 ) )
)

For me the column imports as a character column and all the values are there.

-Jeff

Re: HTML import as data table issue

That worked for me as well with the column as character.

 

There actually is another level of complexity since the original file is an html file that is saved in excel with an html extension (automated data from a machine). So I do the following:

	FileList = pick file("Select Data");

	//Rename xls to html
	
		Basefile=Substr( FileList, Contains(  FileList, "/", -1 )+1  );
		basefile2=left(Basefile,length(Basefile)-3);
		Copy File(FileList,basefile2||"html");
		FileList_final = basefile2||"html";

That is done before I do the previous open function (here again for reference):

 

		dtcd = Open(
			FileList_final,
			"invisible",
			HTML Table( 1, Column Names( 0 ), Data Starts( 1 ) ),
			);