0

I have big excel files like 10K row and 17 column excel files. I try 500 row excel files with EEPlus and its read successfully. However, when I try big excel files i took this error.

Error Image: http://hizliresimyukle.com/images/2019/01/13/e1.jpg

Error Message: OfficeOpenXml.Packaging.Ionic.Zip.BadReadException: 'Could not read block - no data! (position 0x003C712B)'

Code:

string sWebRootFolder = _hostingEnvironment.WebRootPath;
        string sFileName = fileName;

        ImportClass imp = new ImportClass();
        FileInfo file = new FileInfo(Path.Combine(sWebRootFolder, sFileName));
        List<string> header = new List<string>();
        using (ExcelPackage package = new ExcelPackage(file))
        {
            var worksheet = package.Workbook.Worksheets.FirstOrDefault();
            int rowCount = worksheet.Dimension.Rows;
            int ColCount = worksheet.Dimension.Columns;
S.Bayındır
  • 83
  • 1
  • 8
  • How big is the xlsx file? That does not sounds like alot of data, it could be some data type that Epplus cannot handle. If not, can you swtich to 64 bit? See this for more info: https://stackoverflow.com/a/29912563/1324284 – Ernie S Jan 13 '19 at 19:43
  • @Ernie I tried but Nothing changed :( Then, i tried with 5K row this error is solve but this time, package.Workbook.Worksheets.FirstOrDefault(); return null :( In the excel file one column cells include 300 character – S.Bayındır Jan 13 '19 at 22:08
  • I found my problem. My excel files uploaded 0 byte :/ I passed 76K row and 17 column with EPPlus in 1 hour with 1 GB ram cost – S.Bayındır Jan 18 '19 at 13:24

0 Answers0