The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Copy and paste of multiple selected data cells
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ysmik11

Korea
4 Posts

Posted - 06/27/2018 :  06:26:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2017
Operating System: Windows 10

Hello.
I would like to copy and paste the multiple selected data cells, separated in a column(not a contiguous group of cells), to another column.

First, I can select the data cells with 'Ctrl' key.
And If I select two cells, then copy and paste to another column, a group of worksheet cells is pasted, including the cells between the two cells I selected.
the 'Shift' key has the same function when copying and pasting.

I want to copy and paste only the cells I selected..
Please Help...

Hideo Fujii

USA
1582 Posts

Posted - 06/27/2018 :  2:37:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi ysmik11,

Could you please try the following sample to copy cells in a column, then paste to another column,
//////////////////////////////////////////
//Manually select the cells by CTRL+Click
//////////////////////////////////////////
colfrom=1;  //Source col#
colto=2;    //Destination col#
menu -e 57634;   //Copy the selected cells
wks.colSel(colfrom,0); //Deselect source column
wks.colSel(colto,1);   //Select destination column
Menu -e 57637;   //Paste
Hope this helps.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 06/27/2018 2:38:33 PM
Go to Top of Page

ysmik11

Korea
4 Posts

Posted - 06/28/2018 :  03:41:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Hideo Fujii

thanks for your reply.
But the sample makes the same result with when I use 'Ctrl+C' and 'Ctrl+V'.

Is it impossible in this software?
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 06/28/2018 :  09:53:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi ysmik11,

I am very sorry - copy-and-pasting only the incontiguous cells was not yet implemented in the current
version. That behavioral improvement alongside the better handling of missing values would be available
in the coming Origin 2019, which would be published in this fall. We are sorry for the inconvenience.
Please keep tuned. For now, let me consider if there is a possible work-around for your case.

Regards,

--Hideo Fujii
OriginLab
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 06/28/2018 :  11:36:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi ysmik11,

The following sample snippet by utilizing masking may work as a work-around.
This only works when the column has no masked cells. I'm sure there are better ways.
//////////////////////////////////////////
//Manually select the cells by CTRL+Click
//////////////////////////////////////////

//Extract selected cells in a column
//(The column originally shouldn't have masked cells.)
range r1=col(1); //Input column
range r2=col(2); //Output column
menu -e 35536;   //Mask selected cells
jj=0;
for(ii=1; ii<=r1.getsize(); ii++) { //Loop over rows
   if(r1<ii>==1) {  //Is masked?
     jj++;          //Increment output#
     r1<ii>=0;      //Reset mask
     r2[jj]=r1[ii]; //Output the cell value
   }
}
////////////////////////////////////////////////////

Hope this helps.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 06/28/2018 11:39:20 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 06/28/2018 :  8:05:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi ysmik11,

This will work like you expect in the upcoming version 2019 that will be released in late Oct 2018. You can contact Originlab for a beta version.

CP
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000