Option Compare DatabaseType ServerInfo Name As String UID As String PWD As StringEnd TypeType DBInfo SVInfo As ServerInfo DBName As StringEnd Type'-----------------------------------------------'功能:批量导入目录下所有xls文件到sql server'DBInfo:数据库连接信息'xlsPath:xls文件路径'-----------------------------------------------Sub ExcelImportSqlServerInPath(DBInfo As DBInfo, xlsPath As String) If Right(xlsPath, 1) "\" Then xlsPath = xlsPath + "\" En阅读全文>
发表于 @ 2007年08月28日 14:20:00|评论(loading...)|编辑
'功能:批量另存为一个目录下的XLS文件'srcPath 源目录'desPath 目标目录'---------------------------------------Sub SaveAsExcelInPath(srcPath As String, desPath As String) If Right(srcPath, 1) "\" Then srcPath = srcPath + "\" End If If Right(desPath, 1) "\" Then desPath = desPath + "\" End If ChDir srcPath Dim f_name$ f_name = Dir(srcPath + "*.xls") While f_name "" SaveAsExcel srcPath, desPath, f_name f_name = Dir() We阅读全文>
发表于 @ 2007年08月28日 14:10:00|评论(loading...)|编辑