| T O P I C R E V I E W |
| Gandi |
Posted - 03/08/2012 : 12:02:22 PM I am using wks.insert() to insert a column before a certain column that is specified by wks.col = ii. However, the new column takes the width of column ii, while column ii is set to a standard width of 7.
Is there a way to insert a column and make sure the columns to the right keep their original width?
Thanks!
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.5.1 SR2 Operating System: Win 7 (64 bit) |
| 2 L A T E S T R E P L I E S (Newest First) |
| Gandi |
Posted - 03/20/2012 : 11:31:56 PM Thanks for your reply, DrBobShepherd.
Upon closer inspection, what happens is that that each column after the inserted one takes the width of it its right neighbour, with the last one being assigned the default width. Hence one would have to loop over all these columns to assign their correct width. While this is probably doable, I'm finding it hard to believe that there's no simpler way of solving this problem. Any suggestions?
Thanks! |
| Drbobshepherd |
Posted - 03/09/2012 : 10:01:24 AM Before executing the insertion, try this:
wks.col=ii; // Select column. %A=wks.col.width; // Read column width.
Then execute your insertion, followed by:
wks.col=(ii+1); // Select next column, which is actually original. wks.col.width=%A; // Set column to original width.
DrBobShepherd |
|
|