How to get values in excel

Hello Folks

I have a Requirement where i have to split the excel data in multiple rows.

Attached the Input Excel (only yellow background part should write in output sheet) in this i only need the name, designation and Basic should be paste employee wise in Salary Slip Sheet.

The output should be in same excel as shown in salary slip the N number of employees should be Displayed in output sheet with given format.

Much appreciated

Thanks

Have you considered having one sheet per employee instead of having them all on one sheet? Might be easier to format as you could have a template used to create the output that can be copied to a new file.

1 Like

@Bhupesh_Gupta - I’m a bit confused on the pay slip portion. There are 3 payslips with different info in each. How did this get populated? The info is different for each payslip. How do you know the first one is tied to Pankaj?

As for the Sample Salary document, it’s a very poorly created excel document. Even the columns are split into multiple rows, so you cant easily read a datatable from it properly. I would suggest using a read range for the range C9:K1000 (or some other row number that will exceed the most you’ll ever get). Then use the column index to get the data you want. This is heavily reliant on the excel document NOT changing. It is extremely fragile and not something I would feel confident in automating personally. However, if the excel document doesn’t change in structure at all, you can just remove all rows where C is blank, then loop using for each row and get the necessary data by using row.item(0).tostring, row.item(1).tostring, and row.item(8).tostring

Have you considered having one sheet per employee instead of having them all on one sheet?

Yes my Requirement is all employee details should be populated in one sheet. i.e. In same format as employee one should be print for employee 2 and the employee 3 and so on.

@Matt_S
Might be easier to format as you could have a template used to create the output that can be copied to a new file.
Please suggest .xaml file much appreciated
Thank you

@Dave

I’m a bit confused on the pay slip portion. There are 3 payslips with different info in each. How did this get populated? The info is different for each payslip. How do you know the first one is tied to Pankaj?

Answer:- So sorry for confusing sheets. Well attached the new sheet the salary slip format is in same sheet in different tab. Is it possible we can save the salary slip with employee name in different sheet in pdf version? Please suggest

thank you

Is it necessary to create salary slip for each employee in single one @Bhupesh_Gupta

@NIVED_NAMBIAR or can be split it in different sheet with employee names? in pdf

So u mean to split the salary sheet for different employees in new sheet for each and convert to excel file @Bhupesh_Gupta

yes it will works for me that way but can we convert that excel to pdf as well?

Kindly check this

Regards

Nived N :robot:

Happy Automation :slight_smile::slight_smile::slight_smile:

Hi @Bhupesh_Gupta

U can try this package too for PDF conversion

https://connect.uipath.com/marketplace/components/exceltopdfconversion

Well that awesome but can you please share the xaml file for sample salary

Thanks

Hi @Bhupesh_Gupta

This is the xaml you needed, let me know if you need anything. please mark as solution if this helped
bhupesh_.zip (18.0 KB)

Note : If by chance you get “ AsEnumerable is not a member of datatable ” issue then this link will help you to fix: AsEnumerable is not a member of ‘System.Data.Datatable’

Thanks it works for me

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.