I little change sample, so I use this variables:
(but, I can dynamicly create file name through expression properties, like
"c:\\temp\\test_" + substring((DT_STR, 50,1250) GETDATE(),1,10)+".xls"
if I need file name
EvaluateAsExpression property needs to be 'True'
In Excel connection manager in Expression Property I set 'excelFilePath' to @[User::FilePath]
ExcelTab Variable is set throuh Expression to
(EvaluateAsExpression property needs to be 'True')
"CREATE TABLE `" + @[User::region] + "` (
4) In Execute SQL Task, I Set
Connection Type to 'Excel'
Connection to existing Excel connection manager (created in step 2)
SQl source type to 'Variable'
SourceVariable to 'User::ExcelTab' (created in step 3)
Execute workws perfectly if excel file with @[User::region] doesn't exists.
It will fail if it exists.