Page 1 of 1

A few questions about porting from v4

Posted: Thu Feb 21, 2019 9:57 am
by egold2005
Hello,

What would be the equivalents of the following

1. with Range[0, FRow-1, FMaxCol, FRow] do begin
FormatOptions := [foWrapText];

2. Rows.SetRowHeight(FDataStartRow, FRow, trunc(DefaultRowHeight*1.2));

3. with FWorkbook.InternalNames.Add do begin
BuiltInName := bnPrintArea;
Definition := QuotedStr(GetSheetName) + '!$A$1:' + ColRowToRefStr(GetMaxCol,FRow+3,TRUE,TRUE);
end;

Thank you.

Re: A few questions about porting from v4

Posted: Fri Feb 22, 2019 8:10 am
by larsa
Hello

Example:

Code: Select all

  // 1 ******************
  XLS.CmdFormat.BeginEdit(XLS[0]);
  XLS.CmdFormat.Alignment.WrapText := True;
  XLS.CmdFormat.Apply(Col1,Row1,Col2,Row2);

  // 2 ******************
  // Height in default units.
  XLS[0].Rows[Row].Height := H;
  // Height in points.
  XLS[0].Rows[Row].HeightPt := H;
  // Height in pixels.
  XLS[0].Rows[Row].PixelHeight := H;

  // 3 ******************
  XLS[0].PrintSettings.PrintArea(Col1,Row1,Col2,Row2);