I have a data model, which simplified looks like this:
Table1 has a 1:1 relation with Table2
Table1 has a 1:n relation with Table3
Table1 has a 1:n relation with Table4
I want to export the data of Table1 and its relations to Excel using XlsIO.
Currently, I just use worksheet.ImportData(). This works fine.
But when Table1 has multiple entries in Table3, say 2 entries and it has 2 entries in Table4 I end up with 4 rows:
Row-Table1 Row-Table2 Row1-Table3 Row1-Table4
Row-Table1 Row-Table2 Row1-Table3 Row2-Table4
Row-Table1 Row-Table2 Row2-Table3 Row1-Table4
Row-Table1 Row-Table2 Row2-Table3 Row2-Table4
Getting 4 rows is OK, but can I easily skip the duplicate data for Table1 and Table2? Because this export will be used in some additional manual computing and if you now select a column of Table1-data the SUM and AVG are wrong.
I would like to see something like this:
Row-Table1 Row-Table2 Row1-Table3 Row1-Table4
Row2-Table4
Row2-Table3 Row1-Table4
Row2-Table4
Is this possible?