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.

Mon Feb 03, 2020 12:32 pm

I open a web page by IE 11. Then I save the page by IE menu of 'Save As'. In the Save As dialog, I choose to save ALL FILES and fill name box by name '111', then I get one file: 111.html and one folder: 111_files

I use code in your example:

Code: Select all
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        'Open an html file.
        Dim document As New Document()
        document.LoadFromFile("X:\path\111.htm", Spire.Doc.FileFormat.Html, XHTMLValidationType.None)

        'Save it to a Word document.
        document.SaveToFile("HtmlFileToWord.docx", Spire.Doc.FileFormat.Docx)

        'Launch the file.
        WordDocViewer("HtmlFileToWord.docx")
    End Sub


I compile the code without error, and begin to run it. The function 'LoadFromFile' take a long time to do its work. Finally I get error: The format of input string is incorrect at function 'LoadFromFile' .

Who can help?

Thanks.

sincos2007
 
Posts: 2
Joined: Mon Feb 03, 2020 7:00 am

Tue Feb 04, 2020 3:30 am

Hi,

Thanks for your inquiry.
After initial tests, I found some html saved by web pages could be loaded and saved correctly with Spire while some don't. Note our Spire.Doc follows the rules of MS Word, you could open your html by MS Word directly. If MS Word analyzes the html correctly, our Spire will do the same thing. If not, I am afraid our Spire.Doc also cannot do that.
If you still have the issue, please provide your related input files(111.html and the folder: 111_files) for further investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Feb 04, 2020 8:38 am

Hi,

The downloaded page is in the attachment.

Thanks

sincos2007
 
Posts: 2
Joined: Mon Feb 03, 2020 7:00 am

Tue Feb 04, 2020 9:30 am

Hi,

Thanks for your files.
I have reproduced the issue and logged it in our bug tracking system with ticket SPIREDOC-3886. We will let you know as soon as there is any update. Sorry for the inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Mar 25, 2020 10:42 am

Hello,

Thanks for your patient waiting.
The bug SPIREDOC-3886 has been fixed now. Welcome to download the latest Spire.Doc Pack(hot fix) Version:8.3.15 from the following link.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.Doc/8.3.15

Sincerely,
Rachel
E-iceblue support team
User avatar

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

Mon Mar 30, 2020 7:59 am

Hello,

Hope you are doing well.
Have you tested the hotfix? Thanks in advance for your feedback.

Sincerely,
Rachel
E-iceblue support team
User avatar

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

Return to Spire.Doc