By: new2TBS
Date: 2013-07-31
Time: 08:23
|
multidimensional arrayDear friends
I want to export below array to excel. I tried suggestion posted here in forum but with no success.
I cannot attach the image, so giving html
would you please guide me on how to achieve this. also need total per year and branch. In excel, i used below [a.finyr;block=row;sub1] [b.scid;block=row;p1=[fd.$];p2=[a.finyr] ] Thanks in advance |
||
By: Skrol29
Date: 2013-07-31
Time: 11:32
|
Re: multidimensional arrayHi,
Since you data are orgenized with arrays and sub arrays, then you have to use sub-blocks. They are online examples: http://www.tinybutstrong.com/examples.php?e=subblock&m=result Otherwise you have to use a simple array of flat "records". |
||
By: new2TBS
Date: 2013-07-31
Time: 12:02
|
Re: multidimensional arrayHi Skrol
Thanks for your reply. I am trying to export this info in excel sheet. I read about blocks and subblocks, but could not implement it, somehow on excel sheet. The issue, is its multi dimensional array and i cannot keep columns fixed. FE: I dont know, which year will be included. I read in documentation, it can be read with $ sign and it worked correctly. But when i come to level of branch, i dont get values. Would you please elaborate a bit, on how should i proceed and what will be substitution in excel sheet. I am totally lost at the moment. :-( Thanks again. |
||
By: Skrol29
Date: 2013-08-20
Time: 23:54
|
Re: multidimensional arrayHi new2TBS,
> The issue, is its multi dimensional array and i cannot keep columns fixed. The keys are not fixed but you know the structure: $data[$year][$branch][$division][$month] So scan it to build a new recordset: $data2[] = array('year'=>..., 'branch'=>...,'division'=>...,'jan'=>...) With this new flat recorset, the table will be easy displayed. You just have to merged cells but this is not possible with OpenTBS for now, only in Ms Word. |