Reading a word file in C #

I have a document with text that I want to parse with C #. There are many tutorials there, but it's hard for me to decide which library to use. I found the following dlls:

  • Microsoft.Office.Interop.Word
  • Microsoft.Office.Tools.Word
  • Microsoft.Office.Tools.Word.v4.0.Utilities
  • Microsoft Word 12.0 COM Object Library
  • Open xml sdk

That is all I have found on the Internet. Which one should I use? Which of them are outdated?

+6
source share
2 answers

You can also do this with NetOffice.

Website: http://netoffice.codeplex.com/

Using it, you don’t have to worry about versions that are “Syntactically and semantically identical to Microsoft Interop assemblies”, so you do your coding the same way.

Some other benefits:

  • Office integration without version restrictions
  • All objects, methods, properties, and events in Office 2000, 2002, 2003, 2007,2010 are included.
  • Attribute concept and XML source documentation for information on which versions of Office offer a particular method or property
  • No training, if you already know the Office object model, use existing PIA code
  • Reduced and readable code with automatic control of COM proxies
  • There are no obstacles to deployment, no problem registration, no dependencies, no assembly interaction, no VSTO needed
  • Used with .NET version 2.0 or higher
  • Simple application development
+7
source

Beth Massey wrote several articles about the OpenXML SDK on his blog http://blogs.msdn.com/b/bethmassi and even took some screenshots on www.dnrtv. com - this can give you an idea of ​​what you are facing.

0
source

Source: https://habr.com/ru/post/901321/


All Articles