D
Dave
Dear Sirs,
I have a bit of code that generates a table with 40 cells (10 rows, 4
cols). This runs incredibly slow and you can actually watch the cells
being populated with data.
Is there a faster way to populate a table where it would seem instant
to the user?
Thank you,
Dave
// Assume that this._word equals the Word.Application of the word doc
object missing = Type.Missing;
Word.Table tbl = this._word.ActiveDocument.Tables.Add(this._word.ActiveDocument.Range(ref
missing, ref missing), 10, 4, ref missing, ref missing);
int index = 0;
for(int rA = 1; rA <= 10; rA++)
{
for(int cA = 1; cA <= 4; cA++)
{
tbl.Cell(rA, cA).Range.Text = index.ToString();
index++;
}
}
I have a bit of code that generates a table with 40 cells (10 rows, 4
cols). This runs incredibly slow and you can actually watch the cells
being populated with data.
Is there a faster way to populate a table where it would seem instant
to the user?
Thank you,
Dave
// Assume that this._word equals the Word.Application of the word doc
object missing = Type.Missing;
Word.Table tbl = this._word.ActiveDocument.Tables.Add(this._word.ActiveDocument.Range(ref
missing, ref missing), 10, 4, ref missing, ref missing);
int index = 0;
for(int rA = 1; rA <= 10; rA++)
{
for(int cA = 1; cA <= 4; cA++)
{
tbl.Cell(rA, cA).Range.Text = index.ToString();
index++;
}
}