作者:乔山办公网日期:
返回目录:excel表格制作
http://blog.csdn.net/jinjazz/article/details/2710169
图文知教程:图道解SSIS批量导入内Excel文件容
参考下吧
给你个参考吧。 这是我写的用来定义路径的。
在变量区定义
ETLExcFilePath 字符7a64e58685e5aeb9337串 值为X:\XXX\
ETLPageModelName 字符串 值为 你想要取得名字
以下为脚本
Public Sub Main()
Dim reslove As New Tlw.ETLResolve.ETLStandardResolve()
Dim excFilePath As String, configFilePath As String
Dim obj As Object
excFilePath = Dts.Variables("tlw::ETLExcFilePath").Value.ToString() + Dts.Variables("tlw::ETLPageModelName").Value.ToString() + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xml"
Dts.Variables("tlw::ETLExcAllFilePath").Value = excFilePath
configFilePath = Dts.Variables("tlw::ETLConfigFilePath").Value.ToString()
obj = reslove.CreateXMLDataFile(excFilePath, configFilePath)
Dts.Variables("tlw::ETLResloveObj").Value = obj
Dts.TaskResult = Dts.Results.Success
End Sub
我这个是出XML文件的。
至于每个月一次的话 就用JOB吧。
在SQL Server 2008,需要定时自动zd导出数据,需要建立一个作业。这个作业在指定的时间执行一段专脚本(也可以是调用存储过程)就可以了。属
至于导出EXCEL表格的话,可以考虑用BCP语句,导出为csv文件。
1、EXCEL数据导入新表
2、新表数据插copy入原表插入语句
insert into user
select * from newtb t where not exists (select 1 from user where id = t.id)
ID重复插入重复需要插入查询看哪zd些重复ID改需要再进行插入