I want to read column product and Count in file config.
column product = sheet name in file input
I want to write column Sum in file input by check value in file config.
Please guide me for solve it.
I want to read column product and Count in file config.
column product = sheet name in file input
I want to write column Sum in file input by check value in file config.
Please guide me for solve it.
@Ramya_K @Nithinkrishna You can guide me this case?
Hi @fairymemay,
If u are using a newer version u should have the “Get Workbook Sheets” under excel activities, then u could try the following logic:
Build a dataTable that will be your “File Config”:
Use Excel application Scope to read the “File Input”
Use Get Workbook Sheets to get all Sheets name (“AA”, “AB”)
Get Workbook sheets will return u a List that contains all the names of the sheets. I called my variable “sheetsNames”
Make a for each loop to loop through all sheet names:
Inside the for each:
5.1. Use a read range and pass the sheet variable (or “item” which is the default name) to read all your sheet
5.2. store the result in a variable: I called mine “dtSheet”
5.3. Use Add Data Row to add a row in the “fileConfig” dataTable (which we created on 1.)
Pass an arrayRow like the following:
{sheet, dtSheet.AsEnumerable.Sum(Function(x) Convert.ToDouble(x("Sum").ToString.Trim) ).ToString}
And the dataTable should be “fileConfig”
Finally use the write range (i`m using the one under File System activities, so i need to pass the path) like the following:
This Write Range should be outside the for each!
Hope it helps.
BlankProcess1.zip (16.5 KB)
@Schirru No.
I want to copy value from column Count in file Config —> write in file input column Sum.
Can u check the following, please?
BlankProcess1.zip (16.2 KB)
@Schirru I have a question.
If I don’t want fix column T. But I use column header name (Sum) to fix.
How edit it ?
@fairymemay, can u try to replace the expression with the following:
String.Format("{0}2:{0}{1}",Chr(96 + (dtSheet.Columns("Sum").Ordinal + 1)), dtSheet.Rows.Count + 1)
Let me know if it helps.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.