Read Range Workbook settings: Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral

Hi,

I am migrating Window-Legacy project to Windows. When converted the project to Windows and running it I am getting below error when reading the excel file:

Read Range Workbook settings: Could not load file or assembly ‘DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=************’. The system cannot find the file specified.

How can I resolve this.

@Rohit_More

  • Check Dependencies:
  • Open UiPath Studio.
  • Go to “Manage Packages.”
  • Search for DocumentFormat.OpenXml and install it if needed.
  • Update Project Dependencies:
  • Go to “Manage Packages.”
  • Update all packages.
  • Check Compatibility:
  • Ensure the DocumentFormat.OpenXml package version is compatible with your project (preferably the referenced 2.7.2 version).
  • Restart UiPath Studio:
  • Close and reopen UiPath Studio.
  • Rebuild Project:
  • Close UiPath Studio.
  • Delete the .local folder in the project directory.
  • Reopen and rebuild the project.

@Rohit_More

Please update the UiPath.system package in manage packages.

Hi @Rohit_More

Update all the dependencies in your project to the latest version and for every dependency keep the Lowest as applicable option for the runtime rule.

You can update all dependencies in Manage packages.

Check the below image for better understanding,

Hope it helps!!

Hi,

Thanks for the quick response everyone.

I have tried below things but still the same error persists:

@Krishna_Raj Tried to install DocumentFormat.OpenXml but looks like no suck package available
Have tried updating all dependencies to latest
Basis compatibility, 2.7.2 version is not available in Windows project
Restart Studio already tried
tried removing .local folder

@rlgandu Tried updating UiPath.system package

@mkankatala Tried updating all the packages keeping runtime rule as Lowest applicable

Even after trying all above option the issue still persists

@Rohit_More

In the imports panel import DocumentFormat.OpenXml
Check your datatable variable is created in your Xaml

@rlgandu Checked but cannot find this in imports panel

@Rohit_More

Delete System.Activities and System.Excel package and the reinstall that packages.Or try to create a new project in windows

@rlgandu Tried this as well but no luck :frowning:

@Rohit_More,

Take the backup of project.json file.
Close the Studio
Delete project.json
Open the project by double clicking Main.xaml

This will rebuild the project.json as per activities requirement.

Thanks,
Ashok :slight_smile:

It looks like there might be some proxy or something blocking the package downloading or working correctly but not exactly sure if this is the cause.

I tried doing this migration in some other server and it was working.

then I copied the same working/converted code to the original server and again started getting this error. How should I tackle or in which way I can handle/resolve this issue?

Thanks !

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