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
 export ASCII

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
vmike Posted - 10/30/2003 : 11:33:44 AM
How to export worksheet columns to ASCII file in OriginC?
Thanks.
3   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 10/31/2003 : 4:54:14 PM
Sorry about this, looks like this command was added in July 2003, so is available in Origin 7.5, but not in Origin 7 SR4 which was released in March 2003.



/**
Export worksheet to a ASCII file
Parameters:
lpcszFilename = a full path file name
dwCntrl = can be the following value(defined in OC_Const.h):
WKS_EXPORT_HEADING 0x0001 // col name
WKS_EXPORT_ALL 0x0002 // ignore c1c2r1r2
WKS_EXPORT_LABELS 0x0004 // col label
WKS_EXPORT_SELECTED 0x0008 // only selected cols
lpcszSeparator = the separator in the data file. The default separator is "\t".
nR1 = first row in the data range to be included with the data file.
nC1 = first column in the data range to be included with the data file.
nR2 = last row in the data range to be included with the data file.
nC2 = last column in the data range to be included with the data file.
Return:
On error, returns -1, otherwise returns the exported file size.
Example:
void test_export_ascii()
{
Worksheet wks = Project.ActiveLayer();
if(wks)
{
string strFile = GetSaveAsBox("*.dat");
wks.ExportASCII(strFile, WKS_EXPORT_ALL);
}
}

*/
int ExportASCII(LPCSTR lpcszFilename, DWORD dwCntrl, char cSeparator = '\t', int nR1 = 0, int nC1 = 0, int nR2 = -1, int nC2 = -1);





CP


vmike Posted - 10/31/2003 : 11:27:39 AM
Thanhk for reply.
I cant find it in my OriginC Help. (I have downloaded Origin 7 SR4 Help files).
Where can I get information on it?
thx.

cpyang Posted - 10/31/2003 : 08:48:44 AM
Did you try the Worksheet class ExportASCII function?

CP



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