N
NOPIK
Can I speed up a cells merging?
I'm transferring a report from Excel into Word. It has a lot of
differently formatted rows. Preformatting (cells
allocation,text,borders, etc) went fast, but when I start merge cells
execution time become 4-10 times longer (I got about 7sec without
merged cells, and about 30 with them). I already get rid of variants
where possible, and ScreenUpdating is False (anyway, saves only 2-4
seconds for my case).
Here is the problem code:
tabl.Cell(actrow, mrgcolstart).Merge Mergeto:=tabl.Cell(actrow,
mrgcolend)
Where tabl - target word table, actrow - row number, mrgcolstart and
mrgcolend starting and ending merged columns from row parser.
I'm transferring a report from Excel into Word. It has a lot of
differently formatted rows. Preformatting (cells
allocation,text,borders, etc) went fast, but when I start merge cells
execution time become 4-10 times longer (I got about 7sec without
merged cells, and about 30 with them). I already get rid of variants
where possible, and ScreenUpdating is False (anyway, saves only 2-4
seconds for my case).
Here is the problem code:
tabl.Cell(actrow, mrgcolstart).Merge Mergeto:=tabl.Cell(actrow,
mrgcolend)
Where tabl - target word table, actrow - row number, mrgcolstart and
mrgcolend starting and ending merged columns from row parser.