Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

word experienced an error trying to open the file Error #47

Closed
saamtehraani opened this issue May 5, 2019 · 2 comments
Closed

word experienced an error trying to open the file Error #47

saamtehraani opened this issue May 5, 2019 · 2 comments

Comments

@saamtehraani
Copy link

saamtehraani commented May 5, 2019

I have tried to convert HTML to OpenXML. When I want to open the generated file I get this error:

image

This is my code:

                string background = ((dynamic)obj).Entity.Background as string;                    
                HtmlConverter converter = new HtmlConverter(mainDocumentPart);
                IList<OpenXmlCompositeElement> convertedToHTML = converter.Parse(background);
                List<OpenXmlElement> openXmlElementList = new List<OpenXmlElement>();

                convertedToHTML.ToList().ForEach(q =>
                {
                    var convertedOpenXmlElement = q as OpenXmlElement;
                    openXmlElementList.Add(convertedOpenXmlElement);
                });

                addAction(new Run(convertedToHTML.ToList()));
@saamtehraani
Copy link
Author

Solved

@onizet onizet closed this as completed Jun 4, 2019
@luisromerodev
Copy link

I am facing similar issue. seems like html is not right ? any thoughts how do you resolved ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants