I am reading data from once excel by using filter data table & Read range.
Then I use Write range workbook but I get this error:
“Write Range Workbook: A malformed URI was found in the document. Please provide a OpenSettings.RelationshipErrorRewriter to handle these errors while opening a package.”
There is no straight or readymade solution for this but you can utilize the ClearHyperlinks method available in the Excel Application Scope. Here’s how you can do it:
Use Excel Application Scope: Drag and drop an “Excel Application Scope” activity onto your workflow. Specify the Excel file you want to work with.
Invoke VBA Macro: Within the Excel Application Scope, use the “Invoke VBA” activity to execute a VBA macro that clears the hyperlinks.
Create VBA Macro: Create a VBA macro within your Excel file that clears hyperlinks from the desired cells.
Here’s a step-by-step guide:
Excel Application Scope:
Drag and drop an “Excel Application Scope” activity onto your workflow.
Configure it to specify the Excel file you want to work with.
Invoke VBA Macro:
Within the Excel Application Scope, add an “Invoke VBA” activity.
In the “Code” field of the activity properties, enter the VBA macro code to clear hyperlinks.
Create VBA Macro:
Open your Excel file.
Press Alt + F11 to open the Visual Basic for Applications (VBA) editor.
Insert a new module by right-clicking on “Modules” in the Project Explorer and selecting “Insert” > “Module”.
Copy and paste the following VBA macro code into the module:
Sub ClearHyperlinks()
Dim rng As Range
For Each rng In ActiveSheet.UsedRange
If rng.Hyperlinks.Count > 0 Then
rng.Hyperlinks.Delete
End If
Next rng
End Sub
Run the Workflow: Execute your workflow. The VBA macro will be invoked within the Excel Application Scope, and it will clear the hyperlinks from the specified Excel file.
This approach ensures that hyperlinks are removed from the Excel file without affecting other data or formatting. Make sure to adjust the Excel file path and any other parameters as needed for your specific scenario.
Click File > Options > Proofing.
Click AutoCorrect Options, and then click the AutoFormat As You Type tab.
Clear the Internet and network paths with hyperlinks check box.