?
Solved

Word interop (automation)

Posted on 2004-11-17
2
Medium Priority
?
334 Views
Last Modified: 2012-06-21
Hi,

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.

Regards,

Ad
0
Comment
Question by:adje_
2 Comments
 
LVL 8

Accepted Solution

by:
tomvergote earned 375 total points
ID: 12617248
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):
http://support.microsoft.com/kb/316384/EN-US/
even the msdn c# samples use the cell by cell manner
http://support.microsoft.com/Default.aspx?kbid=261999

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
doc.addtable
for (i=0;i<infinity;i++)
{
table.adcell
}
0
 

Author Comment

by:adje_
ID: 12642236
Not the answer I was hoping for ;-)

Regards,

Adje
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month16 days, 13 hours left to enroll

864 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