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
 How to copy a page with a LongName?

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
olsy Posted - 09/15/2011 : 05:24:03 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8.5Pro
Operating System:Win7

Hi guys!
I tried to copy a worksheet with this code:
// create a copy of The best to calculate statistics
Worksheet wks = Project.ActiveLayer();
int newWks = WksPage.AddLayer( "Statistics" );
Worksheet WksRes = WksPage.Layers( newWks );
if(wks)
{
Worksheet wksDest=WksPage.Layers( newWks );


int nC1 = 0, nC2 = wks.GetNumCols()-1; //want to copy all columns
int nR1 = 0, nR2 = -1; // want to copy rows 10-230
int nDestC1 = 0; // copy data to destination worksheet start from the first column
DWORD dwCtrl = CPYT_COPY_COLUMN_FORMAT | CPYT_COPY_COLUMN_DESIGNATIONS; // want to keep column format and designations with copied data

int nRet = wks.CopyTo(wksDest, nC1, 10, nR1, nR2, nDestC1, -1, dwCtrl);

}

But it copy only a data without the LongName.
How i can copy everything in the same workbook just in a new worksheet?
3   L A T E S T    R E P L I E S    (Newest First)
olsy Posted - 09/21/2011 : 10:47:30 AM
Thanks greg!!!
works )
a13cbold Posted - 09/21/2011 : 06:30:25 AM
Well I do have the same issue too about copying, thank God I'm not alone to this thing here.

tratamiento para la diabetes
tratamientos de la diabetes
greg Posted - 09/15/2011 : 4:42:11 PM
// create a copy of The best to calculate statistics
Worksheet wks = Project.ActiveLayer();
WorksheetPage WksPage = wks.GetPage();
int newWks = WksPage.AddLayer( "Statistics" );
Worksheet WksRes = WksPage.Layers( newWks );
if(wks)
{
Worksheet wksDest=WksPage.Layers( newWks );


int nC1 = 0, nC2 = wks.GetNumCols()-1; //want to copy all columns
int nR1 = 0, nR2 = -1; // want to copy rows 10-230
int nDestC1 = 0; // copy data to destination worksheet start from the first column
DWORD dwCtrl = CPYT_COPY_COLUMN_FORMAT | CPYT_COPY_COLUMN_DESIGNATIONS | CPYT_COPY_COLUMN_LABELS; // want to keep column format and designations with copied data

int nRet = wks.CopyTo(wksDest, nC1, 10, nR1, nR2, nDestC1, -1, dwCtrl);

}

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