Windows error 0x8003001D, -2147287011

Detailed Error Information

STG_E_WRITEFAULT[1]

MessageA disk error occurred during a write operation.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode3 (0x003)
NameFACILITY_STORAGE[2][1]
DescriptionThe source of the error code is OLE Storage.[2][1]
Error Code29 (0x001d)

Questions

49votes
8answers

Using EPPlus with a MemoryStream

I am using EPPlus to generate an XLSX file in C#. As soon as I instantiate the ExcelPackage with a memory stream - I get the error: > "A disk error occurred during a write operation. (Exception from HRESULT: > 0x8003001D (STG_E_WRITEFAULT))" Code is: MemoryStream stream = new MemoryStream(); using [...] read more
c#
excel
epplus
4votes
2answers

A disk error occurred during a write operation. (Exception from HRESULT: 0x8003001D (STG_E_WRITEFAULT))

I am using EPPlus to read .csv file in vb.net. When I run this code, I get the error "A disk error occurred during a write operation. > (Exception from HRESULT: 0x8003001D (STG_E_WRITEFAULT))" Here is my code : Public Function ImportExcelSheet(ByVal filePath As String) As DataTable Dim dtImportData As New [...] read more
asp.net
vb.net
opencsv
3votes
2answers

How to read excel using EPPlus

using .net 4.5 I'm trying to read .xls/.xlsx file using EPPlus (v4.0.4), but get an error. SO has questions on the same error but none relate or solve my problem. protected void Page_Load(object sender, EventArgs e) { GetDataTableFromExcel(@"D:\test.xlsx"); } private DataTable GetDataTableFromExcel(string path, bool hasHeader = true) { using (var [...] read more
c#
epplus
3votes
1answer

STG_E_WRITEFAULT while reading Excel file with Epplus

In an ASP.NET MVC Core (.netcore2) application, I'm using the following method to read an Excel file. [HttpPost] public IActionResult Import (IFormFile importFile) { using (var excel = new ExcelPackage(importFile.OpenReadStream()) { var sheet = excel.Workbook.Worksheets.FirstOrDefault(); if (sheet == null) return BadRequest("No worksheet."); var events = /* import logic */ return [...] read more
c#
asp.net-core
epplus
3votes
0answers

Error reading xlsx (2007) file in EPPLUS

I have an error while trying to read excel files (xlsx) which were saved in Excel 2007 using EPPlus library. Some workaround: 1. ASP.net mvc 5 app with EPPlus v. 4.0.4.0 2. User can download template file from my site, then fill required data in it, and upload it back. [...] read more
asp.net
asp.net-mvc
excel-2007
epplus
epplus-4
3votes
1answer

Load stream in Epplus causes disk write error

Im upload an excel file and trying to load it into a ExcelPackage. Like this public static void ImportStuff(Stream stream) { using (ExcelPackage package = new ExcelPackage()) { package.Load(stream); ... My calling method gets the stream from an uploaded file public async Task<ActionResult> UploadCsv(int Id, HttpPostedFileBase myfile) { ImportProducts(myfile.InputStream); } [...] read more
asp.net-mvc-4
epplus
1vote
1answer

Import a CSV or XLSX Into A DataTable Using EPPLus

I found a thread on SO and am attempting to import a csv or xls or xlsx into a C# DataTable - but I am getting the below stack trace error: System.Runtime.InteropServices.COMException HResult=0x8003001D Message=A disk error occurred during a write operation. (Exception from HRESULT: 0x8003001D (STG_E_WRITEFAULT)) Source=EPPlus This is the [...] read more
c#
datatable
epplus
epplus-4
1vote
0answers

Reading xlsx file steam stuck with A disk error occurred during a write operation. (Exception from HRESULT: 0x8003001D (STG_E_WRITEFAULT))

i am using using OfficeOpenXml; for reading excel file and its working fine with other reading file but for one perticular file i got above mention error. check this image [https://i.stack.imgur.com/wJPZi.png] public ReadExcelFile(Stream stream, string worksheet, List<ExcelColumnMapping> columnMapping, ITypeConvert typeConvert = null, int headerSize = 1) { _stream = stream; [...] read more
c#
excel
1vote
1answer

nopcommerce A disk error occurred during a write operation. (Exception from HRESULT: 0x8003001D (STG_E_WRITEFAULT))

> i am working in nopcommerce solution 3.90, while importing products, from > excel file i get this exception. my code is as follow public virtual void ImportProductsFromXlsx(Stream stream) { try { #region Import business Logic using (var xlPackage = new ExcelPackage(stream)) { //get the first worksheet in the workbook [...] read more
c#
asp.net-mvc
excel
nopcommerce-3.90
0votes
0answers

Multiple Excel upload error in ExcelPackage EPPlus

public ActionResult ExcelFile(IEnumerable < HttpPostedFileBase > excelFile) { try { if (excelFile != null) { foreach(var singleExcel in excelFile) { string path = "~/ExcelFolder/"; singleExcel.SaveAs(Server.MapPath(path + singleExcel.FileName)); using(FileStream fs = new FileStream(Server.MapPath(path + singleExcel.FileName), FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { using(ExcelPackage package = new ExcelPackage(fs)) { ExcelWorksheet sheet = package.Workbook.Worksheets[1]; int startRowNumber [...] read more
asp.net-mvc
excel
c#-4.0
epplus
0votes
2answers

Disk error while trying to export excel c#

I am trying to export an excel file using EPPlus if (FileUpload1.HasFile && Path.GetExtension(FileUpload1.FileName) == ".xlsx") { bo.ExcelFile = txtFileName.Text; bo.ExcelFileBranch = txtBranchName.Text; bo.ExcelFileFromDate = txtValidFrom.Text; bo.ExcelFileToDate = txtValidTo.Text; using (var excel = new ExcelPackage(FileUpload1.PostedFile.InputStream)) { var tbl = new DataTable(); var ws = excel.Workbook.Worksheets.First(); var hasHeader = false; // [...] read more
c#
.net
epplus
0votes
1answer

EPPLus Error when loading a Stream larger than 40MB

I am using EPPlus on C# MVC to load excel files into memory. I am taking the stream from a file upload: model.File.InputStream and pass this to the ExcelPackage.Load() Method. It works great for files < 40 MB. But for larger files, I get the error: > An exception of [...] read more
c#
asp.net-mvc
excel
epplus
epplus-4

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0