Z zhoudongchao Unregistered / Unconfirmed GUEST, unregistred user! 2003-12-03 #1 如何在delphi中实现excel的一个单元格的数据的一行转化为两行 在vba中是"fdfg"&char(10)&"fgh"
R realLearning Unregistered / Unconfirmed GUEST, unregistred user! 2003-12-03 #2 procedure TForm1.Button1Click(Sender: TObject); var Sheet : _WorkSheet; WorkBook : _WorkBook; begin XLSApp.Connect; try XLSApp.Visible[0] := True; WorkBook := XLSApp.Workbooks.Add(EmptyParam,0); Sheet := WorkBook.Worksheets.Item[1] as _WorkSheet; Sheet.Cells.Item[1,1].Value := '123'+#10+'456'; finally XLSApp.Disconnect ; end; end;
procedure TForm1.Button1Click(Sender: TObject); var Sheet : _WorkSheet; WorkBook : _WorkBook; begin XLSApp.Connect; try XLSApp.Visible[0] := True; WorkBook := XLSApp.Workbooks.Add(EmptyParam,0); Sheet := WorkBook.Worksheets.Item[1] as _WorkSheet; Sheet.Cells.Item[1,1].Value := '123'+#10+'456'; finally XLSApp.Disconnect ; end; end;