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
 Origin Forum
 String values in cell

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
ermano Posted - 05/22/2003 : 5:22:08 PM
Could anybody tell me how I could read/access an individual cell of a text column (each cell containing string values) from/into Origin C ?

Thank you
3   L A T E S T    R E P L I E S    (Newest First)
ermano Posted - 05/23/2003 : 03:46:06 AM
Thanks a lot/ Vielen Dank

Both do actually work, I spent ages to find this information
since the manual is not very explicative on the subject.

ermano


P.s.: Tcell hat in det Tat den Vorteil einfacher und uebersichtlicher
zu sein
hajo_old Posted - 05/23/2003 : 02:58:09 AM
Hello, ermano

try out the function TCell()

Worksheet::TCell
Prototype: PUBLIC string TCell(int nRow, int nCol)

Worksheet::SetCell
Prototype: PUBLIC BOOL SetCell(int nRow, int nCol, LPCSTR lpcszText)

This should work with string values within worksheets
(more details - see programming help)

Cio
Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1
rlewis Posted - 05/22/2003 : 6:42:09 PM
The following function is a listing of a function in which the text of an origin Worksheet cell is accessed ... Hope this helps..

void HartStringToDouble(String WorkSheetName, int ColNumber, int NumChars)
{
/*
Removes a User-Defined number of Characters from the beginning of strings
Stored in an Origin Worksheet Text Column. The column is assumed to the
"Text" or "Text & Numeric"
*/
Dataset MyWksColumn;
int SizeOfColumn, i, StringLength;
String MyBuffer;
if(MyWksColumn.Attach(WorkSheetName,(ColNumber-1)))
{
SizeOfColumn=MyWksColumn.GetSize();
for (i=0;i<SizeOfColumn;i++)
{
if(MyWksColumn.GetText(i,MyBuffer))
{
MyBuffer.Delete(0,NumChars);
MyWksColumn.SetText(i,MyBuffer);
}
}

}
}

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