Find 10th Character for each row of specific column

Hi,
I need a help over to code and find the 10th character of the column “No” for each row and add an extra column for each row specifying the character at 10th position.
Here I have attached the excel file for the same.
Invoice.xlsx (10.0 KB)
Please help me with the solution.
Thanks.

in general we can do:

  • excel read range -output: dtData
  • Add additional Datacolumn to dtData with the Add DataColumn Activity
  • for each row loop over dtData
  • getting the 10th char:
    grafik
    so we can update within the loop:
    Assign Activity:
    row("YourNewColName") = row("No").ToString().Trim()(9).toString

@Kunal_Jain

YourString.Chars(9)

HI @Kunal_Jain

Try like this

  • Excel Application Scope
    • Read RAnge store them in a DT
  • For each row in Datatable
    • Message box - CurrentRow(“No”).Tostring(9)

Sample xaml file
Sequence.xaml (7.9 KB)

Regards
Sudharsan

@Kunal_Jain
Kindly find the below Xaml file you may get some idea.
Forum_CharFind_Excel.zip (75.6 KB)

Hi @ppr
Is there any way where we can just check the year for the same
Suppose
10th character that we have got need to be compared with year stored in config file
K=2022
L=2023
M=2024
N=2025
And PFA
year for the same “No” column is stored in 3rd file
Here I have attached the Year Sheet also
Year Sheet.xlsx (10.0 KB)
Please help me out with the solution for this

Hi @Gokul_Jayakumar
Is there any way where we can just check the year for the same
Suppose
10th character that we have got need to be compared with year stored in config file
K=2022
L=2023
M=2024
N=2025
And PFA
year for the same “No” column is stored in 3rd file
Here I have attached the Year Sheet also
Year Sheet.xlsx (10.0 KB)
Please help me out with the solution for this

Hi @Sudharsan_Ka
Is there any way where we can just check the year for the same
Suppose
10th character that we have got need to be compared with year stored in config file
K=2022
L=2023
M=2024
N=2025
And PFA
year for the same “No” column is stored in 3rd file
Here I have attached the Year Sheet also
Year Sheet.xlsx (10.0 KB)
Please help me out with the solution for this

Hello @Kunal_Jain
Kindly refer the updated flow :point_down:
Forum_CharFind_Excel.zip (93.8 KB)

Hi @Gokul_Jayakumar
In the present workflow you have just used year sheet file
year sheet file is just for comparison with Invoice file and data need to be saved in Invoice sheet

@Kunal_Jain
Kindly share more details and expected output, it helps us to provide you better solutions

I need to compare to excel sheet year sheet and Invoice
we need to compare both the sheet
and from Invoice sheet first compare column NO and find the 10th character
Than with same Column No compare it with Second Sheet Year Sheet column “No” which contain Year Column and compare it in switch case that you have written and write the output in Invoice Sheet


Check the Image for the Reference

@Kunal_Jain
Check with this updated XAML file
Forum_CharFind_Excel.zip (102.6 KB)

HI @Kunal_Jain

I think the condition will be like can you confirm this?

Check the No columns on both the excel and get the year from the year sheet and compare them with the year in the date column of Invoice sheet

Checkout the xaml file
Sequence.xaml (14.6 KB)
Invoice.xlsx (9.8 KB)
Year Sheet.xlsx (9.7 KB)

Regards
Sudharsan

Along with these condition I have specified one more thing that the year stored in config file
K=2022
L=2023
M=2024
N=2025
needs to be compared with 10th character that we are extracting
Understand this

  1. We are extracting 10th character
  2. Config file contain fixed value for the specific Character
  3. We are comparing the No of both the sheets.
  4. And after that compare date, Year column and also compare with the value of config file (Switch case) and than write the result into Invoice sheet
  5. We will check date and the Year column

Okay so status should be based on which column? @Kunal_Jain

@Sudharsan_Ka
Status should be based on comparison of all the year columns because we need to compare all date columns and final result will be stored in invoice sheet

@Kunal_Jain Did you check the above file? :point_up_2:
Let me know if any changes

Yes I have checked it
I am Working on it

Hi @Sudharsan_Ka
Any solution??