Project 1 — Beginner

Excel Data Cleaner Bot

Sales team roz 12 Excel files bhejti hai — mismatched headers, extra spaces, missing phone numbers. 2 ghante manual cleaning. Aaj is bot ko banayenge jo ye sab 2 minute me kar dega.

⏱ 25 min• Beginner• UiPath Studio (Community)

Project kya karega?

WHAT

Ek UiPath bot jo 12 branch Excel files padhega — extra spaces trim karega, blank rows delete karega, dates ko ek format me layega — aur ek consolidated summary report banayega. Output: ek clean Excel file + summary sheet.

WHEN

Jab bhi multi-file Excel consolidation chahiye — sales reports, inventory updates, attendance sheets, fee records. Ye RPA ka sabse common beginner project hai kyunki har company Excel par chalti hai.

WHERE

Finance teams, back offices, data entry departments. Naukriyon me "Excel automation" likhe to is project ki baat hoti hai. Portfolio me ye project dikhao to recruiter ko turant samajh aata hai ki tum practical ho.

Business reality: Ek company me 6 log sirf Excel clean karne me 2 ghante roz lagate hain — 120 ghante mahina. Bot ek baar ban gaya, to har subah 9 baje fresh report ready. Ye hi RPA ka asli paisa hai — automation se jo bachat hoti hai, wahi company tumhe salary deti hai.

Step-by-step build

Studio me naya Sequential Workflow banao. Activity tree aisa hogi:

Main.xaml (Sequence)
 |
 +-- Try Catch
 |    |
 |    +-- Sequence: Process Files
 |    |    +-- Assign  in_Folder = "C:\Input\"
 |    |    +-- Assign  out_File  = "C:\Output\Consolidated_" + DateTime.Now.ToString("yyyyMMdd") + ".xlsx"
 |    |    +-- For Each File: in_Folder + "*.xlsx"  ->  currentFile
 |    |    |    +-- Excel Application Scope (currentFile)
 |    |    |    |    +-- Read Range  "Sheet1"  ->  dtBranch
 |    |    |    |    +-- For Each Row  dtBranch
 |    |    |    |         +-- Assign  row("Name") = row("Name").ToString.Trim()
 |    |    |    |         +-- If  String.IsNullOrWhiteSpace(row("Phone"))
 |    |    |    |              +-- Assign  row("Phone") = "MISSING"
 |    |    |    +-- Merge Data Table: dtAll <- dtBranch
 |    |    +-- Write Range dtAll to out_File (Add Header)
 |    |    +-- Excel Application Scope (out_File)
 |    |         +-- Invoke Code: summary formulas (total rows, MISSING count)
 |    +-- Catch (Exception)
 |         +-- Log Message  LogLevel.Error  ex.Message
 |         +-- Message Box  "Processing failed - check logs"

Har file ek iteration me process hoti hai. Merge Data Table sab branches ko ek DataTable me jodta hai — pehli file ke headers hi master maan lo.

Config & variables

Hardcoded paths kabhi mat likho. Variables panel me ye types rakho:

Variable          Type          Scope
------          ----          -----
in_Folder       String        Sequence
out_File        String        Sequence
currentFile     FileInfo      For Each File
dtBranch        DataTable     For Each File
dtAll           DataTable     Process Files
row             DataRow       For Each Row

# Config.xlsx (pehle hi banao - baad me sab bots me chahiye)
Key            Value
INPUT_FOLDER   C:\Input\
OUTPUT_FOLDER  C:\Output\
MAX_ROWS       50000

Variables ka naam prefix rakho — in_ (input), out_ (output), io_ (both). Enterprise projects me naming convention review me check hota hai.

Error handling

Try Catch ke alawa ek zaroori check — header mismatch. Agar kisi file me "Phone" column hi nahi, to row("Phone") pe exception aayega:

If  dtBranch.Columns.Contains("Phone") = False
     +-- Log Message  LogLevel.Warning  "Phone column missing: " + currentFile.Name
     +-- Continue For Each  (skip this file, process next)

Enterprise tips

Interview question: "Excel Application Scope aur Workbook activities me kya difference hai?" — Excel Application Scope ek visible Excel instance kholta hai (formatting, formulas preserve), Workbook activities headless hain (fast, Excel install zaroori nahi) lekin formatting nahi milti. Batch processing ke liye Workbook, formatting chahiye to Excel Application Scope.

Exercise

Question: String me extra spaces hatane ka .NET method kaunsa hai? (3 letters)

Question: Excel file ka data padhne ke liye kaunsa scope activity use hoti hai? (3 words)

Common mistakes

Lesson complete?

Project ban gaya? Ab next project pe chalte hain — Invoice Processing Bot.

Popular courses: Data Science Course in Lucknow · AI Course in Lucknow · Python Course in Lucknow · Power BI Course · Data Analytics Course