A few questions about porting from v4

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
egold2005
Posts: 6
Joined: Fri Nov 04, 2016 6:22 am

A few questions about porting from v4

Post 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.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: A few questions about porting from v4

Post 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);
Lars Arvidsson, Axolot Data
Post Reply