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.

Fri Apr 03, 2020 7:26 am

Hi,

When i run the below code with the attached file as input i get the error: {"Input string was not in a correct format."}
Code: Select all
 Document doc = new Document();
 doc.LoadFromFile(@"C:\Temp\new 1.html");


However, if I set the culture to InvariantCulture it works:
Code: Select all
CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Document doc = new Document();
doc.LoadFromFile(@"C:\Temp\new 1.html");


OS and Region information:
Windows 10 Pro, Region: Sweden. Display language English(United states).

Best regards,
Fredrik

fredan
 
Posts: 9
Joined: Tue Jun 19, 2018 6:52 am

Fri Apr 03, 2020 8:20 am

Hello,

Thanks for your inquiry.
I did notice this issue and have logged it in our bug tracking system with the ticket SPIREDOC-4155 for further investigation.
If there is any update, we will let you know. 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

Return to Spire.Doc