Hi,
How do you add a worksheet and give it a name, and how do you know how many worksheets there are in the workbook?
best
Jon
Adding worksheets
Re: Adding worksheets
To add a new sheet
To get the sheet count
Code: Select all
// XLS is an XLSReadWriteII5 component
XLS.Add;
// Name it
XLS[XLS.Count - 1].Name := 'NewName';
Code: Select all
var
NumSheets: Integer;
begin
NumSheets := XLS.Count;
end;