table content paste to MS Word error
Posted: Sun Apr 01, 2012 5:03 am
When i copy a cell content and paste it to MS word, there will be added many empty line.
code to read the table content like this:
code to load xml to table like this:
code to read the table content like this:
Code: Select all
for j := 0 to RVData.ItemCount-1 do
begin
if (j>0) and RVData.IsFromNewLine(j) then
xmlstr := xmlstr + #13#10;
if RVData.GetItemStyle(j)=rvstab then
xmlstr := xmlstr + #9
else if RVData.GetItemStyle(j)>=0 then
xmlstr := xmlstr + RVData.GetItemText(j);
end;
Code: Select all
if teststr <> '' then
begin
table.Cells[r,c].GetRVData.Clear;
table.Cells[r,c].GetRVData.AddNL(teststr,NewStyleNo,0);
end;
RichviewEdit.Format;