Data table scriptGood morning,
I just switched to jmp 18 recently.
I was using version 16 before. I created a script to extract numerical analysis data from several samples. I concatenated these different samples into a single data table. Then I transpose. And the transposed version is then added to another database with the subsequent samples. This script worked correctly before I upgraded to jmp 18.
Now the column names that are numeric values do not match the original ones. JMP allows itself to add decimals or not, which messes up my columns. I have 650 columns and I can't afford to recode everything. A little help would be welcome.
GP
Automation and Scripting
Re: Script table de donnéesHi @GregP ,
Can you provide the script? It's hard to comment without seeing what you are using.
Thanks,
Ben
Re: Data table scriptHere is the script I just removed the directories
a = Pick Directory("Select a directory");/*Allows you to choose the recording directory*/
Multiple File Import(
<
a
),
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
) << Import Data;
dt = Current Data Table();
dt << Delete Columns(:"Time (s)"n, :Index, :Current range);
dt << New Column("MODALITE",
Numeric,
"Continuous",
Format("Best", 12),
Formula(Word(1, :File Name, "."))
);
dt << Transpose(
columns(:"WE(1).Current (A)"n),
By(:MODALITE),
Label(:"Potential applied (V)"n),
Output Table("Transposed table")
);
dt << Subset(
By(:MODALITE),
All rows,
Selected columns only(0),
columns(:"Potential applied (V)"n, :"WE(1).Current (A)"n)
);
Open("link");
Data Table("BASE VOLTAMMO TRANSPOSE") << Concatenate(
Data Table("Transposed table"),
Append to first table
);
Close("Transposed table");
Data Table("BASE VOLTAMMO TRANSPOSE") << Save("link");
Re: Data table scriptSmall clarification I just saw that the difference happens at the time of import. I import csv files when I open them in excel there are the correct values but with jmp there are decimals that are added is there not a parameter to modify? here is a photo of the tables in excel and jmp. thank you

Re: Script table de donnéesDo they values look same in text editor (not in excel) and in JMP? Excel tends to modify and format your data which JMP generally does not do.
Re: Data table scriptI don't know if you received my script, it doesn't appear in the discussion.
Re: Data table scriptI don't know because I save the file directly in Excel but when I look more closely at the analysis program, the first value has one decimal place less than in Excel and therefore 2 less in JMP.
I think I'll have to edit each column manually.
Re: Script table de données
a = Pick Directory("Select a directory");/*Permet de choisir le répertoire d'enregistrement*/
Multiple File Import(
<<SET folder=""></SET>Re: Script table de donnéesBased on the import script I think you do have .csv data which is text? You can open it with notepad and compare JMP and that text. If you wish to add fixed dec in JMP to all continous columns, you can use standardize attributes or script it.



JMP created script (notice that the column names are hard coded)
// Standardize column attributes
Local({old dt = Current Data Table()},
Current Data Table(Data Table("Big Class"));
For Each({col, index}, {:height, :weight}, col << Format("Fixed Dec", 12, 2));
Current Data Table(old dt);
);Re: Data table scriptThank you for your feedback.
The files are indeed Excel. I have already tried to standardize the attributes but that only partially solves the problem: If I put 9 decimals I am left with 1 column out of 7 which only has 8, it is still not good. I do not understand this change, I had never had a problem until installing the latest version.
THANKS
Re: Script table de donnéesJMP18 did change how excel files are being imported to JMP, maybe that is what you are seeing ( JMP Note 655981 - Changes to the import of Microsoft Excel files in JMP® 18 )