Origin Version (Select Help-->About Origin): 7 SR2
Operating System: vista
Hi,
This is the context :
I have two matrix of integers (mipower & midate).
I want to copy each row of them in different worksheet (ie having in each of the new worksheet, the nth row of mipower and the nth row of midate).
Unfortunately, the numbers i have at the end are not the one expected.
here is my code :
for(jj=0; jj<iNbNommines; jj++)
{
//int iIndexCol = wks.AddCol(/*"candidat"*/);
Worksheet feuille_resultats;
feuille_resultats.Create();
Column colDate = feuille_resultats.Columns(0);
Column colPower = feuille_resultats.Columns(1);
Dataset dsdate;
dsdate.Attach(feuille_resultats, 0);
Dataset dspower;
dspower.Attach(feuille_resultats, 1);
dsdate.SetSize(viNbEvent[jj]);
dspower.SetSize(viNbEvent[jj]);
for(int kk=0; kk<viNbEvent[jj]; kk++)
{
dspower[kk]=miNommineP[jj][kk];
dsdate[kk]= dsTime[miNommineD[jj][kk]]; //here is a first problem since dsdate expects an integer whereas dsTime contains a date type (ex 03-07-2007 12:22:45).
printf("right value: %d, left value : %d\n", miNommineP[jj][kk], dspower[kk]);
}
}
The resulting worksheet contains only '0' for the column dspower, and '-' for the column dsdate.
Besides, here is the trace of the printf line :
right value : 0, left value : 0
right value : 0, left value : 0
right value : 0, left value : 0
right value : -97, left value : 0
right value : 0, left value : 0
right value : 0, left value : 0
Hope you'll can help me.
Thanks.
Simon Nicolas