We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to import DOCX into Aspose.Words DOM using .NET | FileCorruptedException

hi,

we’re using aspose words .net (Aspose.Words.17.6.0) to extract paragraphs with specific styles from document. However, for some users it intermittently throws an exception:

Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. —> System.ArgumentNullException: Value cannot be null.
Parameter name: String
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at .( , )
at ? .( ? )
at ? .()
at ? .()
at ? . ? ? ()
at ? .()
at ? .()
at ? .()
at ?? . ? ? ()
at Aspose.Words.Document.(Stream , LoadOptions )
— End of inner exception stack trace —
at Aspose.Words.Document.(Stream , LoadOptions )
at Aspose.Words.Document.(Stream , LoadOptions )
at Aspose.Words.Document…ctor(Stream stream, LoadOptions loadOptions)

System.ArgumentNullException: Value cannot be null.
Parameter name: String
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at .( , )
at ? .( ? )
at ? .()
at ? .()
at ? . ? ? ()
at ? .()
at ? .()
at ? .()
at ?? . ? ? ()
at Aspose.Words.Document.(Stream , LoadOptions )

What could be the issue and the solution?

Thanks,
Eimantas

uploading document as zip doc.zip (501.0 KB)

@EimantasJpmc

We have tested the scenario using the latest version of Aspose.Words for .NET 20.9 and have not found the shared issue. So, please use Aspose.Words for .NET 20.9.