| Author |
Topic  |
|
|
PUGrad
USA
Posts |
Posted - 06/20/2007 : 10:09:58 AM
|
Origin Version (Select Help-->About Origin): 7.5 SR6 Operating System: Windows XP I've got 2 1-D arrays, each with 500 points. They are created and filled in an origin C program. How to I write them to a worksheet, so that it will show the values of one array in Col A and one array in Col B. I've looked around and done a lot of readin, and am still a but confused on this point... thanks.. |
|
|
Mike Buess
USA
3037 Posts |
Posted - 06/20/2007 : 11:07:15 AM
|
If you really mean array (e.g., double aa[500]) rather than vector (vector<double> vv(500)) then you must set the cell values one at a time...
double a1[500],a2[500]; // set array values Worksheet wks = Project.ActiveLayer(); for(int i=0;i<500;i++) { wks.SetCell(i,0,a1[i]); // col A wks.SetCell(i,1,a2[i]); // col B }
It's much easier with vector...
vector v1(500),v2(500); // set vector values Worksheet wks = Project.ActiveLayer(); Dataset d1(wks,0),d2(wks,1); d1 = v1; // set col A d2 = v2; // set col B
Mike Buess Origin WebRing Member |
 |
|
| |
Topic  |
|
|
|