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
 loading string values into a Dataset
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mikec

USA
Posts

Posted - 01/06/2004 :  2:33:46 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'm trying to alter the Automation example to read data from a file, the problem I,m having is this.

I would like the x axis to be titles (strings) as apposed to numerical, however the Dataset template does not allow for string values. I tried having the Dataset declaired as a character array but that I'm having trouble converting the values.

Is there an easier way to do this?


thanks for the help.

cpyang

USA
1406 Posts

Posted - 01/07/2004 :  9:56:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To put text into a worksheet, you will be better off with defualt column type (Text & Numeric) and just call

BOOL SetCell(int nRow, int nCol, LPCSTR lpcszText);

in worksheet class.

Alternatively, Dataset class also have
BOOL SetText(int nRow, LPCSTR lpcszTextValue);



If you have read a column of Text values from your file, you can also use Dataset class's

BOOL PutStringArray(vector<string>& as, int nRow1=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