Excel 基于查询结果生成列

Excel 基于查询结果生成列,excel,excel-2003,Excel,Excel 2003,我有四个支点从中提取数据,如下所示: tracked_work_by_users_by_operation_pivot: +-------------------+---------------+---------------+-----------------------+---------------+ | DATE(start_time) | userid | operation_id | Time estimated | Time Elapsed | +

我有四个支点从中提取数据,如下所示:

tracked_work_by_users_by_operation_pivot:
+-------------------+---------------+---------------+-----------------------+---------------+
|  DATE(start_time) | userid        | operation_id  | Time estimated        | Time Elapsed  |
+-------------------+---------------+---------------+-----------------------+---------------+
| 1/2/2011-1/8/2011 | jsmith        |             11|                     40|             40|
| 1/2/2011-1/8/2011 | jsmith        |             10|                     20|             24|
+-------------------+---------------+---------------+-----------------------+---------------+

faults_by_user_pivot:
+-------------------+---------------+---------------+-----------------------+----------+
| date(date_entered)| userid        | operation_id  | Major                 | Minor    |
+-------------------+---------------+---------------+-----------------------+----------+
| 1/2/2011-1/8/2011 | jsmith        |             11|                     2 |         1|
+-------------------+---------------+---------------+-----------------------+----------+

paid_hours_by_user_pivot:
+-------------------+---------------+---------+
|date_range         | userid        | Total   |
+-------------------+---------------+---------+
| 1/2/2011-1/8/2011 | jsmith        | 40      |
+-------------------+---------------+---------+


tracked_work_by_users_pivot:
+-------------------+---------------+---------+
|DATE(start_time)   | userid        | Total   |
+-------------------+---------------+---------+
| 1/2/2011-1/8/2011 | jsmith        | 24      |
|                   |               |         |
+-------------------+---------------+---------+
我需要做的是为每个操作的每个用户编译一个报告。从我看来,最好的方法是采用类似以下格式:

                     +--------------+--------------+                                              +--------------+--------------+
                     |    jsmith    |  packaging   |                                              |  jsmith      |  machining   |
+--------------------+--------------+--------------+----------------+--------------+--------------+--------------+--------------+----------------+--------------+--------------+
|    DATE            | time_elapsed | hours_worked | estimated_work | minor_faults | major_faults | time_elapsed | hours_worked | estimated_work | minor_faults | major_faults |
+--------------------+--------------+--------------+----------------+--------------+--------------+--------------+--------------+----------------+--------------+--------------+
| 1/2/2011-1/8/2011  |           24 |           40 |             36 |            1 |            2 |           24 |           40 |             36 |            1 |            2 |              
+--------------------+--------------+--------------+----------------+--------------+--------------+--------------+--------------+----------------+--------------+--------------+

因此,jsmith将有单独的加工和包装条目,因为我们希望能够将他与所有加工操作员和所有包装操作员进行排名。如何才能最好地做到这一点,使我不必在每次添加新用户时再添加12个条目(因为有12个操作)?

实现这一点的最佳方法似乎是简单地编写一个应用程序,而不是将excel强大地配置到其中