*Create the object: oExcel = CreateObject("Excel.Application") oExcel.Visible = .t. *State how many worksheets will be in the xls doc via: oExcel.SheetsInNewWorkBook = 4 *Open the doc I just made: oExcel.Workbooks.Add() && Here I change Your code .OPEN() oWorkbook = oExcel.ActiveWorkbook n = 0 FOR EACH oSh IN oWorkbook.Sheets oSh.Name = "Bbbb"+STR(n,1) && That is the name of the sheet n = n + 1 NEXT