**Source and destination I didn’t get. **
DT I created in Read Range Activity.
Fine the steps involved are
—create a datatable with build datatable activity and create with similar columns in the excel file and get output with a variable of type datatable named finaldt
—now as you said get files and loop through it
—but inside the loop next to read range activity with output variable of type datatable named outdt, use a merge datatable activity and in source mention as outdt and in destination mention as Finaldt
—next to the loop we can use append range activity
Cheers @balkishan
I have a first column name date/time in the excel.
Throwing date/time error bro
@balkishan you have a easier way to do this, Create a List of files for each file do read range and do append range. Create a Counter So that when you read the first file you use a write range and if the counter >1 use a Append Range.
Fine
once after getting the datatable from read range activity inside the for each loop
use a writeline activity and lets check what is the datatype of that column and create the datatable using build datatable activity with same set of columns and column types
–in writeline mention as
datatablename.Columns(“Yourcolumnname”).GetType.ToString
this will give us the datatype of the column
–so based on that create the datatable using build datatable activity with same column type for that particular column
if needed we can validate with some more writelines and check the datatype of other columns and create the build datatable with same datatype columns
cheers @balkishan
sorry type mistake
yourdatatablename.Columns(“yourcolumnname”).Datatype.ToString
Cheers @balkishan
It worked bro. But give me the blank excel file. If I see the size it containing data. [ 406 KB ]
or lets do one thing instead of append range to existing file
create a new file as master file.xlsx in excel application scope and make sure that the add headers is enabled in the write range activity
Cheers @balkishan
It’s writing the data bro. But it started from Y cell.
As I have data in both the excels from cell A to X
It merged and writing the data in another excel from Y cell.
@Palaniyappan We’re about to done, 95% work done. Just want to ask In the merged final file. It started the data from the Y cell. But I want to write from the A1 cell as I given “A1”. But it start from there only.
I know I can again copy again this data written into another but unnecessary writing the so many activity. Issue is about to resolved bro.
@balkishan As you have used build data Table and you doing a merge it takes the schema of both the tables if the schema is not matching then it creates additional columns, check the Schema Mismatch Property to Ignore and try again.
No, Ignore is not working here . It gives me empty file.
Only ADD working but it gives the data start from Y
Great
Sorry for the delayed response
if possible can i have a viewon the write range activity
Cheers @balkishan
I already set “A1” but it doesn’t working.
It start to writing the data from Y only.
hmm
make sure that write range is used outside the for each loop
i think its used next to the merge datatable
Cheers @balkishan
If I used the Write Range outside the loop same result it gives me. Start from the cell Y
yes because you have use a build datatable and the columns names are not matching or not being considered. As you have A:X columns in Build DataTable it will write from Y, You can try reversing the operation like Change Source Table to Destination and Destination to Source.