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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Inserting Cells

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
blt2si Posted - 03/26/2003 : 08:40:55 AM
Hello all,

A simple task I am having trouble with. I need to insert a range of cells into a dataset or column shifting the inforamtion to the right! Eg. I have 10 columns (datas1 up to datas10). I want to insert cells from row 4 - 10 into datas5 so that the previous information in these cells gets shifted right to datas6.

I tried using "delete range" with "true" statement bu the data previous is deleted.
wks_active.DeleteRange(4,5,10,5,true);

Another question:
I am importing information into a worksheet. The information (data) that is imported has a its own heading for each dataset (i.e. N, Force, etc.). The template has the same dataset names. Is it possible to link the two names together so that if the information came in a different order the datasets could be rearranged automatically to fit the template? Could this be done effectively with 60 datasets (columns)?
or is it possible to make the headings (1st row) of the information (data) imported as the dataset by renaming the default set (A1, B1, B2, B3....etc).

The reason for this is so I can call on dataset names for plotting and if the information comes from a range of places with mixed up columns then this program can overcome it sorting the data.

Thanks

Blank
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 03/28/2003 : 4:50:22 PM
Hi Blank,

The DeleteRange() method that can also be turned into inserting with the flag set to true, only shifts data down within the dataset columns, and not to the right. To do what you are asking for, you will need to write an OriginC function and use the worksheet object to code this kind of shift.

Regarding your second question, if you do want to use a template for the worksheet into which the data should come in, then the solution could be that you bring the (mismatched) data first into a temporary worksheet and then have a program that moves appropriate data from the temp worksheet into appropriate columns of the worksheet created using the template, by matching the dataset names in the two worksheets one by one. For this your import will need to be set up so that the names N, Force etc. are assigned to the datasets at the time of import. If you end up using these strings in the file for your dataset name, then you could also get rid of the template and just do this naming, and then you will be able to refer to the datasets by these names for plotting, computing etc.

Easwar
OriginLab.


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000