<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>22 Dec 2020 13:17:07 Z</lastBuildDate><pubDate>22 Dec 2020 09:35:09 Z</pubDate><description>Hi all,&#13;
&#13;
As there is no HTMLtoDOC() function in WinDev (and it doesn't exist in the base DotNet libraries neither on which I guess the Word Processing in WinDev is built) I am trying to integrate the Git HTML2OpenText library in a WinDev project in order to be able to do such a transformation. &#13;
https://github.com/onizet/html2openxml/tree/dev/src/Html2OpenXml &#13;
&#13;
In C# it works like a charm but I would like to integrate/use it directly from WL without having to write a wrapper C# library around it.&#13;
&#13;
I can translate about everything from C# except for one line.&#13;
Original C# code:&#13;
[code:java]&#13;
generatedDocument = new System.IO.MemoryStream();&#13;
package = WordprocessingDocument.Create(generatedDocument, WordprocessingDocumentType.Document);&#13;
&#13;
mainPart = package.MainDocumentPart;&#13;
if (mainPart == null)&#13;
{&#13;
    mainPart = package.AddMainDocumentPart();&#13;
    new Document(new Body()).Save(mainPart);		==&gt; Can't get this translated to WLanguage&#13;
}&#13;
&#13;
this.converter = new HtmlConverter(mainPart);&#13;
[/code]&#13;
&#13;
And the WL code:&#13;
[code:wl]&#13;
DNetStream is MemoryStream dynamic&#13;
DNetStream = new MemoryStream&#13;
DNetDocx is WordprocessingDocument dynamic&#13;
DNetDocx = WordprocessingDocument.Create(DNetStream,WordprocessingDocumentType.Document)&#13;
DNetDocxMainPart is MainDocumentPart dynamic&#13;
DNetDocxMainPart = DNetDocx.MainDocumentPart&#13;
IF DNetDocxMainPart = Null THEN&#13;
	DNetDocxMainPart = DNetDocx.AddMainDocumentPart() &#13;
	&#13;
	//==&gt; Cannot translate this:&#13;
	new Document(new Body()).Save(mainPart);&#13;
	&#13;
END&#13;
pclDNetConv is HtmlConverter dynamic&#13;
pclDNetConv = new HtmlConverter(DNetDocxMainPart)&#13;
pclDNetConv.ParseHtml(EDT_RawHTML)&#13;
[/code]&#13;
&#13;
Has anybody got some tips?&#13;
TIA&#13;
&#13;
--&#13;
Peter Holemans&#13;
www.mcs2.eu&#13;
www.pixontri.eu</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68209-dotnet-html2openxml/read.awp</link><title>DotNet HTML2OpenXML</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>PeHoBe</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68209-dotnet-html2openxml-68210/read.awp</comments><pubDate>22 Dec 2020 13:17:07 Z</pubDate><description>Hi all&#13;
&#13;
I got an answer from mr. Jurassic Pork on the French forum.&#13;
Here's the solution:&#13;
[code:wl]&#13;
DNetStream is MemoryStre…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68209-dotnet-html2openxml-68210/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68209-dotnet-html2openxml-68210/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68209-dotnet-html2openxml/read.awp">DotNet HTML2OpenXML</source><title>Re: DotNet HTML2OpenXML</title></item></channel></rss>
