Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

OpenXML Excel file corruption, DataValidations

$
0
0

I am creating an excel file using OpenXML SDK 2.0 from a WPF application. The excel file has multiple sheets, data validations for dropdown cells, Formulas, and StyleSheets applied. It works fine creating excel rows of around 17,500 in Sheet1 and 17,500 in Sheet2 as well. However, when the number of rows reaches 25,000 for both Sheet1 and Sheet2 the file gets corrupted i.e. while opening the file it gives an errror "We found a problem with the content in file.xlsx. Do you want to recover as much as we can?" If I recover the file the data is still there for all 25,000 rows in both the sheets however the datavalidations i.e. dropdowns are not applied for any of the cells. The recovery log is as follows, while the repair message in the screenshot.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error946360_01.xml</logFileName><summary>Errors were detected in file 'D:\file.xlsx'</summary><removedFeatures summary="Following is a list of removed features:"><removedFeature>Removed Feature: Data validation from /xl/worksheets/sheet.xml part</removedFeature></removedFeatures><repairedRecords summary="Following is a list of repairs:"><repairedRecord>Repaired Records: Cell information from /xl/worksheets/sheet.xml part</repairedRecord><repairedRecord>Repaired Records: Cell information from /xl/worksheets/sheet2.xml part</repairedRecord></repairedRecords></recoveryLog>

What I am surprised is that 25,000 is not a huge number for corrupting an excel file. The content is the same across all the rows i.e. it has the same content for all the rows, so it should not be something to do with the content.

The file size reaches approximately 1.8 MB

Any ideas/suggestions what could be going wrong here?



Viewing all articles
Browse latest Browse all 1288

Trending Articles



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