Word interop (automation)

Posted on 2004-11-17
Last Modified: 2012-06-21

I am building an application in C# which needs to export a 342 x 5 table to MS Word. At this moment it is done on a cell by cell basis:

tbl.Cell(row, col).Range.Text = "blabla"

This is working perfectly but is very very slow (takes up to 3 minutes). To speed up this process I want to make the call more 'chunky', but I can't find a method to insert the complete table in one call. Did I miss anything, or is it just not possible? Are there other more efficient calls?

Your help is appreciated.


Question by:adje_
    LVL 8

    Accepted Solution

    afaik there is only the cell by cell way to do this, but you could possibly go with tabs if it gets too slow
    like in this url (which is vb but illustrates the tab point):
    even the msdn c# samples use the cell by cell manner

    I don't know your exact case, but I've ran into slowness with word tables too, but afaik the only serious way to manipulate tables is really
    for (i=0;i<infinity;i++)

    Author Comment

    Not the answer I was hoping for ;-)



    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now