#INCLUDE ..\Excel.h goExcel = CREATEOBJECT( "Excel.Application" ) goExcel.Visible = .T. WITH goExcel .SheetsInNewWorkbook = 1 .Workbooks.Add .ActiveSheet.Name = "MySheet" .ActiveWindow.DisplayGridlines = "TRUE" .ActiveWindow.DisplayHeadings = "TRUE" .Application.DisplayFormulaBar = "TRUE" .ActiveSheet.EnableCalculation = "TRUE" .Cells.Font.Name = "Arial" .Cells.Font.Size = 10 .Columns("A:A").NumberFormat = "@" .Cells( 1, 1 ).Value = "Going to password protect this sheet." .Cells( 2, 1 ).Value = "The password, for what it's worth is Pa$$w0rd" * File Name Format Password .ActiveWorkbook.Saveas( "testPassword", xlExcel7, "Pa$$w0rd" ) ENDWITH RELEASE goExcel