我有一个文件“From.xls”,其中有一个包含数据的工作表“From”,该数据将更新到另一个具有工作表“To”的文件“To.xls”。
示例:“From”表在 From.xls 文件中有以下数据
Sno Name Assigned Staus Delivered Date Account No
100 Packet 1 Team 1 Delivered Yes 12-Dec-12 001
101 Packet 2 Team 1 Delivered Yes 12-Dec-12 003
103 Packet 4 Team 2 Not Delivered No 003
105 Packet 6 Team 2 Delivered Yes 12-Dec-12 001
110 Packet 11 Team 2 Delivered Yes 12-Dec-12 002
111 Packet 12 Team 2 Not Delivered No 002
112 Packet 13 Team 2 Delivered Yes 12-Dec-12 001
115 Packet 16 Team 2 Delivered Yes 12-Dec-12 001
116 Packet 17 Team 11 Not Delivered No 002
“To”表在 To.xls 文件中有以下数据
Sno Name Assigned Staus Delivered Date Account No
100 Packet 1 Team 1 No
101 Packet 2 Team 1 No
102 Packet 3 Team 3 No
103 Packet 4 Team 2 No
104 Packet 5 Team 5 No
105 Packet 6 Team 2 No
106 Packet 7 Team 7 No
107 Packet 8 Team 8 No
108 Packet 9 Team 9 No
109 Packet 10 Team 10 No
110 Packet 11 Team 2 No
111 Packet 12 Team 2 No
112 Packet 13 Team 2 No
113 Packet 14 Team3 No
114 Packet 15 Team4 No
115 Packet 16 Team 2 No
116 Packet 17 Team 11 No
117 Packet 18 Team7 No
118 Packet 19 Team8 No
我想根据检查 Sno 和 Name 的条件将“From”表中的所有行更新为“To”表,并一键获得最终的 To 表,如下所示。
Sno Name Assigned Staus Delivered Date Account No
100 Packet 1 Team 1 Delivered Yes 12-Dec-12 001
101 Packet 2 Team 1 Delivered Yes 12-Dec-12 003
102 Packet 3 Team 3 No
103 Packet 4 Team 2 Not Delivered No 003
104 Packet 5 Team 5 No
105 Packet 6 Team 2 Delivered Yes 12-Dec-12 001
106 Packet 7 Team 7 No
107 Packet 8 Team 8 No
108 Packet 9 Team 9 No
109 Packet 10 Team 10 No
110 Packet 11 Team 2 Delivered Yes 12-Dec-12 002
111 Packet 12 Team 2 Not Delivered No 002
112 Packet 13 Team 2 Delivered Yes 12-Dec-12 001
113 Packet 14 Team3 No
114 Packet 15 Team4 No
115 Packet 16 Team 2 Delivered Yes 12-Dec-12 001
116 Packet 17 Team 11 Not Delivered No 002
117 Packet 18 Team7 No
118 Packet 19 Team8 No