Commit 24db002 1 parent 2348432 commit 24db002 Copy full SHA for 24db002
File tree 1 file changed +8
-2
lines changed
taskt/Core/Automation/Commands
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6
6
using taskt . UI . Forms ;
7
7
using System . Data ;
8
8
using System . Text ;
9
+ using System . Linq ;
9
10
10
11
namespace taskt . Core . Automation . Commands
11
12
{
@@ -64,7 +65,7 @@ public override void RunCommand(object sender)
64
65
{
65
66
66
67
67
- var engine = ( Core . Automation . Engine . AutomationEngineInstance ) sender ;
68
+ var engine = ( Core . Automation . Engine . AutomationEngineInstance ) sender ;
68
69
var vInstance = v_InstanceName . ConvertToUserVariable ( engine ) ;
69
70
var excelObject = engine . GetAppInstance ( vInstance ) ;
70
71
var targetAddress1 = v_ExcelCellAddress1 . ConvertToUserVariable ( sender ) ;
@@ -81,7 +82,6 @@ public override void RunCommand(object sender)
81
82
int cl = cellValue . Columns . Count ;
82
83
int rCnt ;
83
84
int cCnt ;
84
- string str ;
85
85
DataTable DT = new DataTable ( ) ;
86
86
for ( rCnt = 1 ; rCnt <= rw ; rCnt ++ )
87
87
{
@@ -109,6 +109,12 @@ public override void RunCommand(object sender)
109
109
VariableValue = DT
110
110
} ;
111
111
112
+ //Overwrites variable if it already exists
113
+ if ( engine . VariableList . Exists ( x => x . VariableName == newDataset . VariableName ) )
114
+ {
115
+ Script . ScriptVariable temp = engine . VariableList . Where ( x => x . VariableName == newDataset . VariableName ) . FirstOrDefault ( ) ;
116
+ engine . VariableList . Remove ( temp ) ;
117
+ }
112
118
engine . VariableList . Add ( newDataset ) ;
113
119
}
114
120
if ( v_Output == "Delimited String" )
You can’t perform that action at this time.
0 commit comments