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
 Forum for Origin C
 Convert Worksheet to Matrix
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

stefannowy

Germany
Posts

Posted - 08/25/2006 :  04:44:04 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: XP

Hi all!

It might be that this is trivial; however I couldn't find any example:

I want to convert an existing worksheet to a matrix (then set its dimension etc.).
It would be really helpful if someone could provide me with a small example.

Thanks!
Stefan

Mike Buess

USA
3037 Posts

Posted - 08/25/2006 :  07:54:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Stefan,

This code copies the active worksheet to a new matrix and automatically adjusts the matrix size to fit the worksheet...

Worksheet wks = Project.ActiveLayer();
if( !wks ) return 0;
MatrixPage mp;
mp.Create("Origin.otm");
Matrix mm(mp.GetName());
bool bRet;
if( mm ) bRet = mm.CopyFromWks(wks);

Mike Buess
Origin WebRing Member
Go to Top of Page

stefannowy

Germany
Posts

Posted - 08/25/2006 :  08:55:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, Mike!

Now I have the starting point for my program!

Stefan
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