Happend error when try to build data table using read range

I using read range to output or build a data table, but below exception happened.

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
DocumentFormat.OpenXml.Packaging.OpenXmlPackageException: Invalid Hyperlink: Malformed URI is embedded as a hyperlink in the document.
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Load()
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.OpenCore(String path, Boolean readWriteMode)
at DocumentFormat.OpenXml.Packaging.SpreadsheetDocument.Open(String path, Boolean isEditable, OpenSettings openSettings)
at ClosedXML.Excel.XLWorkbook.LoadSheets(String fileName) in C:\Projects\ClosedXML\ClosedXML\Excel\XLWorkbook_Load.cs:line 44
at UiPath.Excel.WorkbookFile…ctor(String workbookPath, String password, Boolean createNew)
at UiPath.Excel.Activities.WorkbookActivity1.ConstructWorkbook(String path, String password, Boolean createNew) at UiPath.Excel.Activities.WorkbookActivity1.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Hello!

Could you please share a screenshot of how you’re doing the Read Range?

Here’s an example:

Regards,

Hi Lucas,

Thanks for your reply.
I set my read range is “A0”.
when put the ReadRange into ExcelApplicationScope can fix this issue.

By the way, if i have to put the ReadRange in iteration process, Could you please tell me which execution efficiency is higher between ReadRange(Excel) and ReadRange(Workbook) ?

Best Regards

Always use the ReadRange(Excel) within the Excel Application scope :slight_smile: It’s much better.

Using Excel scope can void unexpected problem.
Thanks for your kindly reply.

1 Like