- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Copying and Pasting Cells
Hi Everyone,
I have a huge file which have many different tests. It looks like each test was appended to the original csv file. I would like to copy and paste the cells which contain the header, and put them into a list. It doesn't matter to me if it is in the same data table or a new one. I would like to write a script to do this. All the tests will be evenly spaced.
I can't share the file, but here is a better visual for what I am looking for.
The data:
The result I would like:
Thank you!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Copying and Pasting Cells
I also tried this, and it works! I don't know if this is the most efficient way to parse data though?
path = "C:\R&D Data\JMP";
fileName = "Sample Table.jmp";
dt = Open(path||"\"||fileName); //open data table
Current Data Table()<<Select Rows (Index(1,10));
dt<<Subset(Columns(Index(1,4)),Rows(Index(1,10)), Linked, Output Table Name ("New Table"));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Copying and Pasting Cells
Do you need a script to do this many times, or just need to get it done once quickly?
To do it quickly, open the file, then use this script ( Fill in Missing Cells ) to get the site and Y copied to each row.
select one row with the headers, use select matching cells, delete the rows. also do this with the blank rows.
Then use Tables>split to get your final table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Copying and Pasting Cells
Thanks Byron,
This is a good resource for me.
I am looking for a script because I will have to do this many times. Is it possible to move rows to a different data table?
I was thinking something like this. It does select the rows and make a new data table. It doesn't move the rows over yet because I am not sure of the syntax for it.
path = "C:\JMP";
fileName = "Sample Table.jmp";
dt = Open(path||"\"||fileName); //open data table
Current Data Table()<<Select Rows (Index(1,10));
dt2=New Table("My Table");
dt << Move Rows(dt2);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Copying and Pasting Cells
I also tried this, and it works! I don't know if this is the most efficient way to parse data though?
path = "C:\R&D Data\JMP";
fileName = "Sample Table.jmp";
dt = Open(path||"\"||fileName); //open data table
Current Data Table()<<Select Rows (Index(1,10));
dt<<Subset(Columns(Index(1,4)),Rows(Index(1,10)), Linked, Output Table Name ("New Table"));