>>* Open the FOX2X DBF in Excel, save to .XLSX format: >>m.loExcel.DisplayAlerts = .F. >>m.loWorkbook = m.loExcel.Workbooks.Open( m.lcDBF2X ) >>m.loWorkbook.SaveAs( m.lcFileName ) >> >>* Update column headers with previously saved values: >>m.loWorkSheet = m.loWorkbook.WorkSheets( 1 ) >>m.lnSelect = SELECT( 0 ) >>m.lnIx = 1 >> >>SELECT _XLHeaders >>SCAN ALL >> m.loWorkSheet.Cells( 1, m.lnIx ).NumberFormat = "@" >> m.loWorkSheet.Cells( 1, m.lnIx ).Value = ALLTRIM( _XLHeaders.Hdr ) >> >> m.lnIx = m.lnIx + 1 >> >>ENDSCAN >> >>* BZ5952 - 2015.04.13 - Al Doman >>* Post-processing 2: remove unneeded Referral PK column: >>m.loWorkSheet.Columns( 3 ).Delete( ) >> >>m.loWorkbook.Save( ) >> >>* Cleanup: >>m.loExcel.Quit( ) >>m.loExcel = .NULL. >>RELEASE m.loExcel >>If I comment out the .Delete( ) call, this method is also 100% reliable. Also, if I get the OLE error and click on Ignore, the spreadsheet is created normally except that Column3 is not deleted. So, even though the error message doesn't say which command is causing the problem, that's more evidence it's the .Delete( ) call.