HTML import as data table issueI 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
Data AccessRe: HTML import as data table issueThat 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.
Re: HTML import as data table issueIt'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(
,
"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 |
.2! |
.2! |
| 1514.6 |
Re: HTML import as data table issueThanks 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.
Re: HTML import as data table issueThat 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 ) ),
);