Can't copy open Excel spreadsheet

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't copy open Excel spreadsheet

Evan Ross
I have an Excel spreadsheet in my resources and find that my maven build vailes with “The process cannot access the file because it is being used by another process” when the sheet is open in Excel.

I had a similar issue in my app until I changed the opening of the sheet to be read-only.

It would seem that the maven-resources-plug has the same issue. It should be changed to use a read-only open of the source files that are to be copied.

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

Reply | Threaded
Open this post in threaded view
|

Re: Can't copy open Excel spreadsheet

Hervé BOUTEMY
Le vendredi 24 avril 2020, 19:43:02 CEST Evan Ross a écrit :
> I have an Excel spreadsheet in my resources and find that my maven build
> vailes with “The process cannot access the file because it is being used by
> another process” when the sheet is open in Excel.
I don't have easily access to a situation to test: can you share the full
stacktrace, please?

>
> I had a similar issue in my app until I changed the opening of the sheet to
> be read-only.
can you show precisely which API you were using in your app to open the file
and how you modified the call, please?

>
> It would seem that the maven-resources-plug has the same issue. It should be
> changed to use a read-only open of the source files that are to be copied.
yes, if we can do it, it would be nice

>
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
> 10





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can't copy open Excel spreadsheet

Tushar Kapila
In reply to this post by Evan Ross
This is an OS issue. Maven runs on Java, which asks the OS for a File
object to read. But some applications like excel or windows explorer or
other app might have an open link.

I doubt this is anything the maven team can help you with. Close all apps,
including windows explorer, some times need to kill the process
explorer.exe. I shifted to Ubuntu but have seen this on some dev systems.
Once needed a restart for an odd similar error.

On Sat, 25 Apr, 2020, 00:20 Evan Ross, <[hidden email]>
wrote:

> I have an Excel spreadsheet in my resources and find that my maven build
> vailes with “The process cannot access the file because it is being used by
> another process” when the sheet is open in Excel.
>
> I had a similar issue in my app until I changed the opening of the sheet
> to be read-only.
>
> It would seem that the maven-resources-plug has the same issue. It should
> be changed to use a read-only open of the source files that are to be
> copied.
>
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>