Redian新闻
>
SSIS DYNAMIC EXCEL输出的问题
avatar
SSIS DYNAMIC EXCEL输出的问题# Database - 数据库
l*i
1
职位描述:
招聘实习 销售 市场营销总监助理
公司正快速发展需要Marketing实习生协助公司处理日常事物
要求:
做事有条理,积极进取有奋斗心
流利英文,会西班牙语者更佳
客户服务相关工作经验更佳(或在读学生)
工资:
面议
备注:
有成为正式员工的机会
联系人:
Zack 或 Victor
电话:1(626)4550139
email:H*****[email protected]
公司地址:
1230 Santa Anita Ave. Ste F
South El Monte, CA 91733
avatar
a*p
2
请问一下,在ebay或者amazon上小打小闹卖点东西,需要交税吗?
avatar
e*e
3
【 以下文字转载自 Music 讨论区 】
发信人: elainee (elaine), 信区: Music
标 题: 没有如果-败犬女王
发信站: BBS 未名空间站 (Sat May 2 19:59:36 2009)
没有如果 - 梁静茹
作词 : 严爵 / 作曲 : 严爵
如果我说 爱我没有如果
错过就过 你是不是会难过
若如果拿来当借口
那是不是有一点弱
如果我说 爱我没有如果
真的爱我 就放手一搏
还想什么 还怕什么
快牵起我的手
有人说
世界上最遥远的距离不是生与死
而是我就站在你面前 你却不知道我爱你
我常说
如果人类连爱一个人都被自己绑住
那世界末日已来到
不需要等到地球毁灭掉的那天
如果我说 爱我没有如果
错过就过 你是不是会难过
若如果拿来当借口
那是不是有一点弱
如果我说 爱我没有如果
真的爱我 就放手一搏
还想什么 还怕什么
快牵起我的手
如果 如果 如果 如果 如果
最后变成如果 我也不能接受
错过 错过 错过 错过 错过
我比你更难过 不会一错再错
嗯 这次不要再轻易错过
我常说
如果人类连爱一个人都被自己绑住
那世界末日已来到
不需要等到地球毁灭掉的那
avatar
s*o
4
SSIS要每天输出一个动态的EXCEL,比如REPORT20131001.XLS, REPORT20131002.XLS
等等,这个SSIS的DATA FLOW TASK居然HANDLE不了动态的EXCEL DESTINATION,
非要搞个TEMPLATE, COPY FILE,或者用CMDSHELL去创建,这也太土了,
这么一个基本的报表输出问题,都这么费劲
avatar
y*u
5
不交
avatar
b*g
6
你水平不行啊,是可以的。google create dynamic excel ssis

【在 s**********o 的大作中提到】
: SSIS要每天输出一个动态的EXCEL,比如REPORT20131001.XLS, REPORT20131002.XLS
: 等等,这个SSIS的DATA FLOW TASK居然HANDLE不了动态的EXCEL DESTINATION,
: 非要搞个TEMPLATE, COPY FILE,或者用CMDSHELL去创建,这也太土了,
: 这么一个基本的报表输出问题,都这么费劲

avatar
s*o
7
GOOGLE了半天都是失败的,其实很明显,没有EXCEL FILE之前
就没法MAPPING到EXCEL的TAB里去

【在 b******g 的大作中提到】
: 你水平不行啊,是可以的。google create dynamic excel ssis
avatar
b*g
8
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bda433a
Steps:
1. Click on package properties. Set "DelayValidation" property to True.
The package will not validate tasks, connections, until they are executed.
2. Create a package level variable "XLFileRootDir" as string and set it to
the root
directory where you want the excel file to be created.
Example: C:\Project\Data\
3. Create an Excel connection in the connection manager. Browse to the
target directory
and select the destination XL filename or type it in. It doesn't matter if
the file doesn't exist.
4. Go to the Excel connection properties and expand the expressions ellipse
(The button
with "..." on it).
Under the property drop down, select 'ExcelFilePath' and click on the
ellipse to
configure the expression:
@[User::XLFileRootDir] + (DT_WSTR, 2) DATEPART("DD", GETDATE()) + (DT_WSTR,
2) DATEPART("MM", GETDATE()) + (DT_WSTR, 4) DATEPART("YYYY", GETDATE()) +".
xls"
This should create an xl file like 01132007.xls.
5. Add a SQL task to package and double click to edit.
In the general tab, set 'ConnectionType' to 'Excel'.
For 'SQLStatement', enter the create table SQL to create destination table.
For example:
CREATE TABLE `Employee List` (
`EmployeeId` INTEGER,
`EmployeeName` NVARCHAR(20)
)
Copy the create table command. It will come in handy later.
6. Add a Data Flow task. In the data flow editor, add an OLEDB source and an
Excel destination.
Configure the source to select EmployeeId and EmployeeName from a table.
7. Connect this to Excel destination. In the destination editor, select the
Excel connection in the
manager, choose 'table or view' for data access mode and for 'name of the
Excel sheet' click on
new button and paste the create table command from Step 5.
Map the columns appropriately in the mappings tab and you are done.
avatar
s*o
9
问题出在最后一部的MAPPING上,根本就不能选NAME OF THE EXCEL SHEET
直接就INVALID ARGUMENT了,因为EXCEL FILE不存在,所以根本没有SHEET可选,
没有SHEET怎么MAPPING
avatar
s*o
10


【在 s**********o 的大作中提到】
: 问题出在最后一部的MAPPING上,根本就不能选NAME OF THE EXCEL SHEET
: 直接就INVALID ARGUMENT了,因为EXCEL FILE不存在,所以根本没有SHEET可选,
: 没有SHEET怎么MAPPING

avatar
s*o
11
根本就没有第七步的OPTION就ERROR掉了 click on
new button and paste the create table command from Step 5.
Map the columns appropriately in the mappings tab and you are done.
avatar
b*g
12
我刚才做了一下是works,我是sql server 2008 bids,在"name of excel sheet" 右边
有个 new ,不知道你的为啥没有,你和oledb source 连了吗?

【在 s**********o 的大作中提到】
: 根本就没有第七步的OPTION就ERROR掉了 click on
: new button and paste the create table command from Step 5.
: Map the columns appropriately in the mappings tab and you are done.

avatar
s*o
13
我的EXCELFILEPATH有些问题,因为是两个USER VARIABLE链接起来的,其实是@[email protected]
FILENAME,EVALUATE的话不出值,不过CREATE TABLE就是CREATE EXCEL FILE了,
CONNECT STRING显示这个
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=;Extended Properties="EXCEL 12
.0;HDR=YES";
avatar
b*g
14
你data source 不应该是空的,应该是
c:\temp\4102013.xlsx

【在 s**********o 的大作中提到】
: 我的EXCELFILEPATH有些问题,因为是两个USER VARIABLE链接起来的,其实是@[email protected]
: FILENAME,EVALUATE的话不出值,不过CREATE TABLE就是CREATE EXCEL FILE了,
: CONNECT STRING显示这个
: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=;Extended Properties="EXCEL 12
: .0;HDR=YES";

avatar
s*o
15
是EXCELFILEPATH的问题,链接的USER VARIABLES不能EVALUE出值来,
改好了,不需要NEW了,我在DATA FLOW之前用了个CREATE TAB的
SQL TASK,谢谢你啊
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。