if the months are represented with numbers how to change them with the month name
for example - if the column value is 1 then it should change into apr if it 2 then it should change as may etc., likewise it should change
sheet1.xlsx (11.7 KB)
the month should e come in beside column
Please correct me if i’m wrong
As per your requirement you need to write as below:
1 - April
2 - May
3 - June
4 - July
5 - August
6 - September
7 - October
8 - November
9 - December
10 - January
Regards
we can get an array with month names by:
So now we setup a formula which picks up with the offset the right name
1 → April, 2 - May…
For test series we evaluate it for all months
so when taking the column value we will parse it into an int32 by
MonthNo = CInt(yourRowVar(ColNameOrIndex).toString.Trim)
and get the month by
MonthName = arrMonthNames((MonthNo + 2) Mod 12)
Hey @anjani_priya
You can also use simple dictionary and switch statement.
New Dictionary(Of Integer, String) From {{1, "April"}, {2, "May"}, {3, "June"}, {4, "July"}, {5, "August"}, {6, "September"}, {7, "October"}, {8, "November"}, {9, "December"}, {10, "January"}, {11, "February"}, {12, "March"}}
Next, in for each data table in ‘switch’ you can use:
CurrentRow("Posting period") = myDictionary(Convert.ToInt32(CurrentRow("Posting period")))
Later on you can use write range to save results to Excel
here is example of workflow:
BlankProcess72.zip (17.9 KB)
I have attached the workflow and output excel please check
Main.xaml (28.7 KB)
sheet1.xlsx (14.9 KB)
Hope it helps!!
my column indexes are different hot to set them?
how can I put that in new column?
You can follow the process in the workflow or share the input with column indexes. I will help you out.
Regards
can’t I declare the column names and write the data?
Check out the below zip file:
BlankProcess22.zip (63.5 KB)
sheet1 is your input and Sheet2 is your Output.
Regards
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.