<! - [Problem], "read Excel files" -> java.io.FileNotFoundException: src \ test \ resources \ 20190530-1.xls (the file can not be executed in a user mapped section open operation requested)

    Dangdang Dangdang ~ ~ ~ you good Keguan, the line now on your little cute Yuyan! ! Then today to tell the story of Tutu ^ _ ^:

    Figure shoes created a maven project, according to the teacher read Excel file case knock again, but after execution error:

    "Java.io.FileNotFoundException: src \ test \ resources \ 20190530-1.xls (The requested operation can not be performed on a file with a user mapped section open),"

    emmmmm ~ error message across very accurate (1 • ㅂ •) و✧, suggesting that the file is being occupied!

    so it is obvious how to solve the problem ~~~~~~

Solution: The first one: Close the open Excel file, re-run the program

     The second: to create a new Excel file, the code reads the new file

    The use of the second diagram, life and death because she could not find an open file, the daemon did not find, finally gave up the first (I guess because before she had once run, the file is occupied by the eclipse, pot tool) .

    Today's story is here again, and we see you next time.

 

Guess you like

Origin www.cnblogs.com/yuyanguniang/p/11699340.html