MS Word Integration in C#? [duplicate] - c#

This question already has answers here:
How can a Word document be created in C#? [closed]
(17 answers)
Generate Word document from c# [duplicate]
(3 answers)
Closed 9 years ago.
I have tried to look around for documentation on this subject, but I haven't really found a concrete answer. Just answers to problems that I am not really facing.
I want to pull some patterns and phrases from a database and generate a docx (or doc?) file in MS Word using C#. It's part of a school project. But the integration part doesn't seem to be very well documented, or I am looking in the wrong places.
Any help with this?

The magic word for google purposes is "Interop". Try this as a starting point:
http://www.dotnetperls.com/word

There are basically two ways to create word documents programmatically:
Create the documents by calling (and starting) word programmatically
Create the word document in the open XML format readable by Word.
For more info see similar questions here on stackoverflow:
How to create word docs programmatically from a template

Try use Open XML SDK 2.0 for Microsoft Office link
It provides easy way to work with docx file.
After words docx format is simple zipped xml file.

Related

Read data from word document in .NET [duplicate]

This question already has answers here:
How to read Microsoft Word documents in .NET? [closed]
(5 answers)
Closed 2 years ago.
I have a requirement to read/parse data collected inside a word document using ASP.NET / C#. I need to store the collected data (not the word document) inside a rational database. The word document has checkbox and drop down controls to capture the data.
I have access to the word document so I can update the document to add any extra tag/hints if required.
Is it possible to parse a word document using .Net?
Install the Microsoft.Office.Interop.Word nuget package.

Read data from .Rdata File in C# [duplicate]

This question already has an answer here:
It is possible to read .Rdata file format from C or Fortran?
(1 answer)
Closed 6 years ago.
I have requirement to read data from ".RData" files and process them in C# application. I could not find any API which I can use in C#, I believe there is an API for F# which I don't use as of now because of learning curve in F#.
Could anybody please suggest code or API to read ".Rdata" files?
There's R.NET which would allow you to execute the load function, then get the saved variables from the environment, maybe? My guess is you'll need to run something like
engine.Evaluate("load('/my/data/dir/mydata.RData')");
var data = engine.GetSymbol("myvariablename");

how to export code from visual studio as a document [duplicate]

This question already has answers here:
Visual Studio: Export C# Code into a PDF file and keep the formatting + colors?
(4 answers)
Closed 6 years ago.
I have a code that I need to put in a document for my coursework but I would like to keep all the formatting and line numbers. Is there any way of doing that?
Copy and paste it.
Ms Word will retain the formatting.
Other text editors might as well.

asp.net + c# tips to edit docx inside my app [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Open/handle Word documents like SharePoint
I´ve developed one website where it is possible to upload docx files to it. Now I want a way to edit it directly in browser, I meant, a way to do like google docs does.
OR
Copy from MSWord to my app window e maintain all the formats, including tables.
for the manipulation of word documents you can use DocX. With this you can read/write from/to word documents (docx not doc). This however is a long way from editing your document in a google docs like manner...
It does match your second request though!

How do I locate a string in a PDF? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Searching for a string in a pdf files
I'm working on an application that must find a location string in a PDF file. The string will look like "Location: XXXXXXXX" where XXXXXXXX is the value I need to use in my application.
How do I read this string from the PDF? Is there a library that I can use to read this? Once I get the string from the PDF I know how I'll process it. I just need to get the value out of the PDF.
Thanks!
You need something which can parse the PDF (you can't just search the file). What language do want to use?

Categories