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

Trying to open word document throws InvalidDataException

$
0
0

I'm trying to open a .doc file using OpenXML and I am getting the following error:

System.IO.InvalidDataException: 'Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory.'

My code is really simple...

var filePath = "C:\\[Rest-Of-Path]\\file.doc"
var wordDocument = WordprocessingDocument.Open(filePath, false);

What could be causing this error? Thanks!


Viewing all articles
Browse latest Browse all 1288

Trending Articles



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