Copy Chart from Excel sheet to Word file

Hi team

Need your help in an automation in that I need to copy Chart from excel file to word file. tried using Get chart activity but getting an error.

Get Chart: Failed setting the current sheet to: User Logins in workbook: Workbook path. Original error message: That name is already taken. Try a different one.

Can someone please help me to fix this?

Hi @Naresh_Upadhyay

  1. Check if there are multiple charts with the same name. If so, rename them to ensure each chart has a unique name or use the chart Index instead of chart name.
  2. And check the worksheet name in the get chart activity.
  3. Else use delay before get chart activity.

Hi

Have a view on this thread for an option

Cheers @Naresh_Upadhyay

Hi @Naresh_Upadhyay

The error message you are encountering, “That name is already taken. Try a different one,” typically occurs when there is a naming conflict or an issue with the sheet name in the Excel workbook you are working with. It’s possible that the sheet name “User Logins” already exists or there is a naming conflict within the Excel workbook.

To resolve this issue and successfully copy a chart from an Excel file to a Word file in UiPath, you can follow these steps:

  1. Check Excel Workbook:
  • Open the Excel workbook you are working with in Microsoft Excel.
  • Verify that there is no sheet named “User Logins” already in the workbook.
  1. Use Excel Activities to Copy the Chart:
  • In UiPath, use Excel activities to copy the chart from the Excel workbook.

xamlCopy code

Excel Application Scope:
    - Excel file path

    Copy Chart:
        - Select the chart you want to copy

Ensure that you are specifying the correct chart to copy within the “Copy Chart” activity.
3. Paste the Chart in Word:

  • Use Word activities to paste the copied chart into your Word document.

xamlCopy code

Word Application Scope:
    - Word document path

    Paste Chart:
        - Paste the chart into the Word document
  1. Ensure Unique Naming:
  • If you are generating a new Excel sheet or Word document, make sure that you are using unique names for them to avoid naming conflicts.
  1. Error Handling:
  • Implement proper error handling in your workflow to handle any potential issues that may arise during the copying and pasting process.

By following these steps and ensuring unique naming within your workflow, you should be able to copy a chart from Excel to Word without encountering the naming conflict error. If the issue persists, double-check your Excel workbook and the names of the sheets and documents involved in the automation to identify any naming conflicts.

Thanks!!

1 Like

Hi @Naresh_Upadhyay

Did u check this package

1 Like

Thanks to all of you for helping me on this!! I have to copy the chart from excel sheet using Click and Ctrl+C then paste chart activity in word file.

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