>That didn't work.
>
Did you verify that your table matches the spreadsheet? Did you manually try to append from this sheet?
>>>I get the following error when trying to import worksheets into a table from exce: ole error code 0x80030020.
>>>
>>>My code is as follows:
>>>
>>>Local loExcel, lnSheets, i, lcName, laSheetNames[1]
>>>
>>>Clear All
>>>
>>>Use S:\VFPAPPS\DEBTSERV\DATA\BOND_REDEMPTIONS.DBF Exclusive
>>>
>>>loExcel = CreateObject("excel.application")
>>>loExcel.Workbooks.Open("S:\VFPAPPS\DEBTSERV\DATA\PRF-first day of month.xls")
>>>lnSheets = loExcel.ActiveWorkbook.Sheets.Count
>>>
>>>Dimension laSheetNames[lnSheets,1]
>>>
>>>For i = 1 to lnSheets
>>> lcName = loExcel.ActiveWorkbook.Sheets[i].name
>>> laSheetNames[i] = lcName
>>>EndFor
>>>
>>>loExcel.Workbooks.Close()
>>>loExcel.Quit()
>>>Release loExcel
>>>
>>>For i = 1 to Alen(laSheetNames)
>>> lcName = laSheetNames[i]
>>> Append From "S:\VFPAPPS\DEBTSERV\DATA\PRF-first day of month.xls" type xl8 sheet (lcName)
>>>EndFor
>>>
>>>What am I missing?
>>
>>Hi Jim,
>>
>>From the quick glance in your code it seems like you should use name expression in your last statement as I showed.
>>
>>Also could be there some strange/exotic names?
If it's not broken, fix it until it is.
My Blog