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

Table lets converter execute but output file is broken #18

Open
Aless55 opened this issue Nov 25, 2021 · 2 comments
Open

Table lets converter execute but output file is broken #18

Aless55 opened this issue Nov 25, 2021 · 2 comments

Comments

@Aless55
Copy link

Aless55 commented Nov 25, 2021

I use this code to convert the html into openXML:
var html is the table as string
var filename is the filename as string

  WordDocument doc = new WordDocument(filename);
  doc.Process(new HtmlParser(html));
  doc.Save();

And following structure gives me problems in the convertion. The html is converted into a .docx file but when opening an "unknown error" appears. This makes it hard for me to debug.
I read the following table from file.

<table>
 <tbody>
   <tr>
     <th colspan="1" rowspan="1" colwidth="260">asdasd</th>
     <th colspan="1" rowspan="1"></th>
     <th colspan="1" rowspan="1"></th>
     <th colspan="1" rowspan="1" colwidth="110"></th>
   </tr>
   <tr>
    <td colspan="1" rowspan="1" colwidth="260"></td>
    <td colspan="1" rowspan="1"> </td>
    <td colspan="1" rowspan="1"></td>
    <td colspan="1" rowspan="1" colwidth="110">{{Arbeitgeber.Hey}}</td>
  </tr>
  <tr>
    <td colspan="1" rowspan="1" colwidth="260">asxdasd </td>
    <td colspan="1" rowspan="1">asdasd</td>
    <td colspan="1" rowspan="1">asd</td>
    <td colspan="1" rowspan="1" colwidth="110">asd</td>
  </tr>
 </tbody>
</table>

I also tried removing the tag but it doesn't change anything.

@kannan-ar Could you point me to my error?

@Aless55 Aless55 changed the title Table kills converter Table lets converter execute but output file is broken Nov 25, 2021
@Aless55
Copy link
Author

Aless55 commented Nov 26, 2021

Edit I just saw that I get a divide_by_zeroE Error when opening the .docx file...

@kannan-ar
Copy link
Owner

I couldn't replicate the issue. Can you please post the word file generated?

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

2 participants