Excel to word data copy paste

abc.xlsx (10.9 KB)
word.docx (25.7 KB)

i have a excel file in the file there will be data given so we have to copy these data and paste to word file and make all the word file separate

i am uploading sample word file and i have to do output like these

please can you able to do these process
guyes help me

Hi @purnima_mandan

Check this workflow I hope this works for you.

Excel To word.zip (87.3 KB)

Thanks,
Vinit Mhatre

kindly check updated workflow in above attachment

Thanks,
Vinit

11

in that word file we also calculate annualRs colume
we have to multiply 12to monthlyRs
and write into annual Rs colume

please help me @NervousTuber

Hi @purnima_mandan ,

You can simply multiply your monthly column value by 12 after converting it to an integer.

Insert unique text or tags into the template word document and replace them with the multiplied value.

(CInt(row("Other Allowance").ToString)*12).ToString

made the necessary changes to the existing process Please check and mark this post as a solution if you found the answer you were looking for.

Excel To word.zip (44.2 KB)

Thanks,
Vinit Mhatre

To copy data from an Excel file and paste it into separate Word documents in UiPath, you can follow these steps:

  1. Use the Read Range activity to read the data from the Excel file into a data table. Specify the path to the Excel file and the range of cells containing the data in the Read Range activity’s properties.
  2. Use a For Each loop to iterate through the rows of the data table.
  3. Inside the For Each loop, use the Open Word Application activity to open a new instance of Microsoft Word.
  4. Use the Type Into activity to type the data from the current row of the data table into the Word document.
  5. Use the Save As activity to save the Word document with a unique file name.
  6. Use the Close Word Document activity to close the Word document.
  7. Use the Close Word Application activity to close the instance of Microsoft Word that was opened in step 3.

Here is an example of how this could be implemented in UiPath:

Copy code

ReadRange excelData = new ReadRange();
excelData.WorkbookPath = "C:\\data.xlsx";
excelData.Range = "A1:B5";

ForEachRow row in excelData.OutputDataTable
{
    OpenWordApplication wordApp = new OpenWordApplication();
    wordApp.Execute();

    TypeInto typeData = new TypeInto();
    typeData.Text = row("Column1").ToString() + " " + row("Column2").ToString();

    SaveAs saveDoc = new SaveAs();
    saveDoc.FileName = "C:\\doc" + row.Index + ".docx";

    CloseWordDocument closeDoc = new CloseWord

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