Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Unassigned: Unable to create mutex (Exception from HRESULT 0x80131464) - SaveAs into MemoryStream [9368]

$
0
0
Hi,

I would like to know if you have any idea with the following issue, basically we are opening an excel file (xlsm) and doing some changes on it (cell colors, adding values to some cells.. etc nothing complicated)... when we do the save as into an Memory Stream we are getting the following issue: Unable to create mutex (Exception from HRESULT 0x80131464)... something that we discovered is that this error is being triggered __only__ when file size is higher than 2.7 MB.

See below how we are saving the file in the Memory Stream.


Dim stream As MemoryStream
Dim workbook As XLWorkbook (Workbook that is being manipulated).

Dim fs As MemoryStream = New MemoryStream()
excelWorkbook.SaveAs(fs)
fs.Seek(0, SeekOrigin.Begin)
fs.Position = 0
Return fs


Again thank you for this software, its amazing.
Comments: Need a way to reproduce it. The following works fine: ``` var wb = new XLWorkbook(@"original.xlsx"); var ms = new MemoryStream(); wb.SaveAs(ms); ms.Seek(0, SeekOrigin.Begin); ms.Position = 0; var fs = new FileStream(@"copy.xlsx", FileMode.Create); ms.CopyTo(fs); fs.Close(); ```

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>