简体   繁体   中英

MS Word, using NPOI library

I would like to use NPOI library to get image from Word file (Doc [97-2003]).

I want to HWPFDocument class, but i can not find namespace, where this class is. I write code in c#.

I don't think you can achieve that using NPOI.
As tonyqus (the guy behind the project) states here and here HWPF is not stable and usable. I've managed to work with MS Word and Excel with " OpenOffice uno SDK ".
It's not straightforward but after a little bit of struggle you can have great results.
You can read how to extract and use the assemblies here and how to achieve what you're looking for here .

Of course you can always use MSOffice Interop but you need to install MS Office on the client where the application is executed.

Hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM