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
 export ASCII
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

vmike

Hungary
2 Posts

Posted - 10/30/2003 :  11:33:44 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
How to export worksheet columns to ASCII file in OriginC?
Thanks.

cpyang

USA
1406 Posts

Posted - 10/31/2003 :  08:48:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Did you try the Worksheet class ExportASCII function?

CP


Go to Top of Page

vmike

Hungary
2 Posts

Posted - 10/31/2003 :  11:27:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.

Go to Top of Page

cpyang

USA
1406 Posts

Posted - 10/31/2003 :  4:54:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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


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