excel - formatting html data and writing back to same cell - performance issue -


i have excel column "a" containing non-formatted html data. format data, following below steps:

1) take non-formatted html data first cell , paste on internet explorer , paste formatted text html page excel column "e" (html text tags formatted text in excel cell)

2) excel column "e", read data each row final row , paste original cell preserving formatting , use below code that.

sub concatenaterichtext(target range, source range)     dim cell range     dim long     dim c long     = 1     target         .clear         each cell in source             .value = .value & vblf & cell.value         next cell         .value = trim(.value)     end     each cell in source         c = 1 len(cell.value)             target.characters(i, 1).font                 .name = cell.characters(c, 1).font.name                 .fontstyle = cell.characters(c, 1).font.fontstyle                 .size = cell.characters(c, 1).font.size                 .strikethrough = cell.characters(c, 1).font.strikethrough                 .superscript = cell.characters(c, 1).font.superscript                 .subscript = cell.characters(c, 1).font.subscript                 .outlinefont = cell.characters(c, 1).font.outlinefont                 .shadow = cell.characters(c, 1).font.shadow                 .underline = cell.characters(c, 1).font.underline                 .colorindex = cell.characters(c, 1).font.colorindex             end             = + 1         next c         = + 1     next cell end sub 

the problem code takes time format data, 54 rows taking 10 minutes...

is there better solution this?

here link complete code http://pastebin.com/fzbqpybg

thanks in advance

note: posted same question on mrexcel.com.i update here if anwers


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -