I'm using Spire.Doc for .NET v5.2.76.4150 and trying to load word document with this code:
- Code: Select all
Document document = new Document();
document.LoadFromFile(@"test2.docx", Spire.Doc.FileFormat.Docx);
But it thows exception:
- Code: Select all
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Convert.ToDecimal(String value)
at spr1983.13(XmlReader A_0, IDocumentObject A_1)
at spr1983.6(XmlReader A_0, Table A_1)
at spr1983.3(XmlReader A_0, TableCell A_1)
at spr1983.2(XmlReader A_0, TableRow A_1)
at spr1983.6(XmlReader A_0, Table A_1)
at spr1983.14(XmlReader A_0, IDocumentObject A_1)
at spr1983.13(Stream A_0)
at spr1983.1(spr968 A_0)
at spr1983.1(Document A_0)
at spr1983.0(String A_0, Document A_1)
at Spire.Doc.Document.13(String A_0)
at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat, String password)
at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat)
You can find file in attachments
Sincerely,
Alexander