|
SQL法:
- select 项目,行次,本年累计金额,本月金额,"1月" as 报告期 from [C:\Users\Administrator\Desktop\利润表\1.xls].[利润表$a1:d33]
- union all
- select 项目,行次,本年累计金额,本月金额,"2月" as 报告期 from [C:\Users\Administrator\Desktop\利润表\2.xls].[利润表$a1:d33]
- union all
- select 项目,行次,本年累计金额,本月金额,"3月" as 报告期 from [C:\Users\Administrator\Desktop\利润表\3.xls].[利润表$a1:d33]
- union all
- select 项目,行次,本年累计金额,本月金额,"4月" as 报告期 from [C:\Users\Administrator\Desktop\利润表\4.xls].[利润表$a1:d33]
- union all
- select 项目,行次,本年累计金额,本月金额,"5月" as 报告期 from [C:\Users\Administrator\Desktop\利润表\5.xls].[利润表$a1:d33]
- union all
- select 项目,行次,本年累计金额,本月金额,"6月" as 报告期 from [C:\Users\Administrator\Desktop\利润表\6.xls].[利润表$a1:d33]
复制代码
|
|