C# と VB.NET の質問掲示板

わんくま同盟

ASP.NET、C++/CLI、Java 何でもどうぞ

C# と VB.NET の入門サイト


■103764 / )  Re[3]: OpenXML 図形
□投稿者/ 魔界の仮面弁士 (3858回)-(2025/07/09(Wed) 17:24:48)
No103763 (su さん) に返信
> CloseやDisposeも試してみたのですが、ダメでした。

ファイルパスではなく、Stream を渡してみるのはどうでしょうか?

New MemoryStream( File.ReadAllBytes( filePath ) ) とか
New FileStream(filePath, Open, Read, ReadWrite) とか。

https://stackoverflow.com/questions/49885226/open-locked-file-with-openxml-in-read-only-mode
https://github.com/ClosedXML/ClosedXML/issues/1589
返信 編集キー/


管理者用

- Child Tree -