How to type all 12 months in Excel File different columns but in same row , using uipath studio

How to type all 12 months in Excel File different columns but in same row , using ui path studio.

below syntax will return array of month names
string[] monthNames = System.Globalization.CultureInfo.CurrentCulture .DateTimeFormat.MonthGenitiveNames

Regards,
Arivu

So which Activity we have to use in how-to-type-all-12-months-in-excel-file-different-columns-but-in-same-row-using-UiPath-studio1

@raghav.bhardwaj.external

You want them as column names if yes then use thw following in generate datatable with columns separator as comma

String.Join(",",System.Globalization.CultureInfo.CurrentCulture .DateTimeFormat.MonthGenitiveNames)

Then paste the output datatable to excel

Cheers

Hi @raghav.bhardwaj.external ,

how your excel file look like how many columns present & how you need to append the data can you provide the sample input & output.

Regards,
Arivu

Hi @raghav.bhardwaj.external

Check this solution, change your path in the write range activity
Main.xaml (12.7 KB)

Regards

Print12months.zip (8.0 KB)
Hii , Please check this one this might help you.

Regards,


This is sample

If you want in abbreviated month you can use the following code to return month list

System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.AbbreviatedMonthNames

Hi @raghav.bhardwaj.external ,
Step 1
DataTable dt= New DataTable()
step 2
string[] monthNames = System.Globalization.CultureInfo.CurrentCulture .DateTimeFormat.MonthGenitiveNames
step 3
For each → monthNames
inside body → add data column activity →
dt- datatable name , Column name -Item.ToString()+"-"+Now.ToString("yy")

Regards,
Arivu

can you send your code or can you share ss as it is not opening my system showing error box pop-up

Main.xaml (10.1 KB)
I have sent the xaml Can u open it now?

image

Please refer SS for your reference

1 Like