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