Posted 27 September 2017, 9:07 pm EST
Hi There,
Sometimes when I am saving my exported data to C1Excel file, I am getting below error message.
************** Exception Text **************
System.NotSupportedException: Stream does not support writing.
at System.IO.FileStream.SetLength(Int64 value)
at C1.C1Zip.ZipEntryStreamWriter.AddCompressed()
at C1.C1Zip.ZipEntryStreamWriter.Close()
at C1.C1Zip.C1ZipFile.Add(Stream srcStream, String entryName)
at C1.C1Excel.OpenXmlWriter.Save(C1ZipFile zipFile)
at C1.C1Excel.OpenXmlWriter.Save(String fileName)
at C1.C1Excel.C1XLBook.SaveInternalOpenXml(String fileName)
at C1.C1Excel.C1XLBook.Save(String fileName, FileFormat format)
I suspect this issue is happening on this line of code.
[vb]mWorkBook.Save(mSaveFileName, FileFormat.OpenXml)[/vb]
where mSaveFileName is the path where I want to save the file and in .xlsx format(mentioned in save method)
This is happening very rarely so I am unable to figure it out why this is happening.
Any suggestions will be appreciated!!
Thanks
S Malleswararao