Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Oct 06, 2020 10:00 am

I get an "Input string was not in a correct format error" when try to load a txt file
Below is the code that I used to load the file.

Code: Select all
Document doc = new Document();
doc.LoadFromFile(@"....\cannotload.txt", Spire.Doc.FileFormat.Html);


Detailed error message:
Code: Select all
   at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToSingle(String value)
   at spr⟴.ᜀ(XmlAttribute A_0, String A_1, ᜃ A_2, ᜁ A_3)
   at spr⟴.ᜀ(XmlNode A_0, ᜁ A_1, ᜃ A_2)
   at spr⟴.ᜍ(XmlNode A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜦ(XmlNode A_0)
   at spr⟴.ᜀ(XmlNodeList A_0)
   at spr⟴.ᜀ(IBody A_0, String A_1, Int32 A_2, Int32 A_3)
   at Spire.Doc.Body.InsertXHTML(String html, Int32 paragraphIndex, Int32 paragraphItemIndex)
   at Spire.Doc.Body.InsertXHTML(String html, Int32 paragraphIndex)
   at Spire.Doc.Document.LoadHTML(TextReader reader, XHTMLValidationType validationType)
   at Spire.Doc.Document.ᜁ(Stream A_0, XHTMLValidationType A_1)
   at Spire.Doc.Document.LoadFromStream(Stream stream, FileFormat fileFormat, XHTMLValidationType validationType)
   at Spire.Doc.Document.ᜁ(String A_0, FileFormat A_1)
   at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat, String password)
   at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat)


I also attached the file for testing.

xiao0207
 
Posts: 43
Joined: Thu Dec 13, 2018 9:50 am

Wed Oct 07, 2020 1:50 am

Hello,

Thanks for your post.
I have reproduced your issue and logged it in our bug tracking system with the ticket SPIREDOC-5045. If there is any update, I will keep you informed.
Sorry for the inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Oct 13, 2020 1:48 am

Hi. rachel.lei
Is there any update on this issue?

xiao0207
 
Posts: 43
Joined: Thu Dec 13, 2018 9:50 am

Tue Oct 13, 2020 3:21 am

Hello,

Thanks for your inquiry.
I just checked the status of your issue but found that it has not been fixed. I have urged our Dev team and requested them to share any possible ETA at their earliest time.
We will keep you informed if there is any update. Thanks for your patience.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Nov 03, 2020 3:56 am

Hi. rachel.lei
Is there any update on this issue? :)

xiao0207
 
Posts: 43
Joined: Thu Dec 13, 2018 9:50 am

Tue Nov 03, 2020 5:40 am

Hello,

Thanks for your contacting.
Glad to tell you that your issue has been resolved. Now our Test team is compiling the new version. We will notify you as soon as the new version is available.
Sorry for the delay and inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri Nov 06, 2020 11:09 am

Hello,

Thanks for your patient waiting.
We just released Spire.Office Platinum(Hotfix) Version:5.11.0 that fixes your issue, please download it from the following links.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
NuGet link: https://www.nuget.org/packages/Spire.Office/5.11.0

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Nov 11, 2020 3:38 am

Hello,

Greetings from E-iceblue!
Has your issue been resolved? Could you please give us some feedback at your convenience?
Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.Doc