Click here to Skip to main content
15,918,330 members

Comments by Weepre (Top 3 by date)

Weepre 5-Jul-16 9:29am View    
as 'bsb25' suggested below one approach would be to use excel interop from your C# code, however another approach would be to use an excel's library for C#.
For example something like the following:

ExcelFile requestBook = ExcelFile.Load("Translation Request.xls");
ExcelFile dictionaryBook = ExcelFile.Load("Translation Dictionary.xls");

// Copy second row from "Sheet1" in "Translation Request.xls" file
// into a "Sheet1" in "Translation Dictionary.xls" file
// onto an "A2" position (the beginning of the second row).
requestBook.Worksheets["Sheet1"].Rows["2"].Cells.CopyTo(
dictionaryBook.Worksheets["Sheet1"], "A2");

dictionaryBook.Save("Translation Dictionary.xls");

You can also refer to this article about reading excel files from C# application.
Weepre 5-Jul-16 9:17am View    
That is true for only newer DOCX file format, working with an older .doc format in .net is a bit hard (its pure binary). Nevertheless there are some approaches that can utilise both formats, like this .net library for word processing:

Dim document = DocumentModel.Load("Sample.docx")
document.Sections(0).PageSetup.PageColor = Color.Black

You can refer to this sample for creating a word document in vb.net.