I have a test that consists of subtests. After the user answers the questions the total of each subtest is calculated. The total is then used against norm tables to get specific data. This is one of the tables: enter image description here
The tables in the middle are the subtests and the values are the total raw score. From this one I get %ile Rank
and Scaled score
for each subtest.
The 2nd table looks like this: https://imgur.com/a/L9fDCnL
From this table I get Grade equivelant
and Age equivelant
for each subtest.
As you see both tables have the same columns in the middle. I want to combine both tables to have the 4 different columns %ile Rank
, Scaled score
, Grade equivelant
, Age equivelant
, and the common columns in one table.
Excel files can be found here: https://filetransfer.io/data-package/Aebi2vRr#link
I tried to save the tables in Excel and use PhpSpreadsheet
to combine both tables:
$spreadsheet1 = IOFactory::load('file1.xlsx');
$spreadsheet2 = IOFactory::load('file2.xlsx');
$worksheet1 = $spreadsheet1->getActiveSheet();
$worksheet2 = $spreadsheet2->getActiveSheet();
$data1 = $worksheet1->toArray();
$data2 = $worksheet2->toArray();
$combined = array_combine($data1, $data2);
but that’s not the result I seek. I want to combine the tables logically using the common columns.
The output should look like that:
%ile Rank | Elison | Blending words | .. | Scaled score | Age equivelant | Grade equivelant
<1 | - | - | .. | 1 | - | -
<1 | - | - | .. | 2 | - | -
.. | .. | .. | .. | .. | .. | ..
16 | - | 0 | .. | 7 | <4.0 | <K.O
25 | 0 | 1 | .. | 8 | <4.0 | <K.O