T O P I C R E V I E W |
ashvilki |
Posted - 08/26/2003 : 8:58:34 PM Hi, guys! I work with imported worksheets with different number of columns. To do column calculations, I was trying to create datasets for each column by creating dataset names like ds0, ds1, ds2 etc using the following script (see below). For obvious reasons, this does not work - both string variable and dataset have the same name. Is there a way around it? (I am sorry for my poor basic C skills...) Thanks,
Alexei
Worksheet wks1 = Project.ActiveLayer(); UINT ncols = wks1.GetNumCols(); UINT nrows = wks1.GetNumRows(); for (int ij =0; ij<ncols; ij++) { String dname2 = ij; String dname1 = "ds"; String Dname =lstrcat(dname1,dname2) ; Dataset Dname(wks1, ij); } |
1 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 08/27/2003 : 9:09:23 PM Hi Alexei,
Unless you really need to give the datasets specific names (not sure it can be done easily) I'd try something like this...
Worksheet wks1 = Project.ActiveLayer(); UINT ncols = wks1.GetNumCols(); UINT nrows = wks1.GetNumRows(); Dataset ds; for (int i =0; i<ncols; i++) { ds.Attach(wks1,i); - do what you want to col i - }
Mike Buess Origin WebRing Member |
|
|