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
 Failing in Dataset.Attach("[*]*!col(*));
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Alex-qwerty

Russia
Posts

Posted - 04/22/2008 :  11:11:08 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): v8.0773
Operating System:WinXP SP2

Hi All!
One of my functions in OriginC shold work on different datasets.
I pass parameter of type string like
"[MyBookName]MySheetName!col(MyColumnName)" to this function.
But if this string is longer than 24 chars, method
MyLocalDataset.Attach("[MyBookName]MySheetName!col(MyColumnName)");
returns false. Why?
How can I pass to my functions the names of Books, Sheets and Columns?
Thanks!

cpyang

USA
1406 Posts

Posted - 04/22/2008 :  8:56:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Until we add such support, you will need to get the Dataset from a worksheet:



void gd(string strBookSheet = "[Book1]Sheet1", string strCol = "A")
{
Worksheet wks(strBookSheet);
Column cc = wks.Columns(strCol);
Dataset dd(cc);

out_double("first cell = %f\n", dd[0]);
}



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