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
 ExportASCII in Origin 2016

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
andygk81 Posted - 03/17/2016 : 3:45:46 PM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2016 64-bit b9.3.226
Operating System: Windows 7 Enterprise

The ExportASCII member of the worksheet class doesn't appear to work as advertised.

The basic code I have in my script is:

void exportASCII00(string filepath, string wkbk, string wkst, int rowi, int rowf, int coli, int colf)
{

WorksheetPage wb = Project.WorksheetPages(wkbk);
Worksheet ws = wb.Layers(wkst);

ws.ExportASCII(filepath, WKS_EXPORT_MISSING_AS_BLANK, '\t', rowi, coli, rowf, colf);

}

The code compiles no problem, however when executed ignores the row and column designations in the ExportASCII commmand. When used as above, a file is indeed created, but is empty (0 kb). If I incorporate WKS_EXPORT_ALL into the ExportASCII command, it exports everything and ignores the column and row designations. I copy and pasted a similar code from the help file to test things out, namely:

wks.ExportASCII(strFileName,
WKS_EXPORT_ALL|WKS_EXPORT_LABELS|WKS_EXPORT_MISSING_AS_BLANK,
'\t',
0, 0, // start with first row, first column
-1, 1); // end with last row, second column

and it also does not work as advertised (i.e. it exports the entire worksheet)...

Anyone run into this issue or have a fix?
3   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 03/23/2016 : 05:59:05 AM
Hi andygk81,

The member function wks.ExportASCII is a little bit old.
You may try to see if another global function export_ascii_data() fits your need.
http://www.originlab.com/doc/OriginC/ref/export_ascii_data
andygk81 Posted - 03/21/2016 : 5:16:51 PM
Good to know, thanks for the response!
jasonzhao Posted - 03/21/2016 : 02:55:09 AM
Hello,

The problem is a bug. I have submitted this issue with ID: ORG-14531, it will be fixed in our next version.

Best regards!
Jason
OriginLab Technical Service

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