>>>Hi everybody,
>>>
>>>I'm trying to use Cetin's VFP2Excel program to create Excel file with notes (memo) field.
>>>
>>>I combined my DBF2Excel program with VFP2Excel and I tested it with the local database, the file comes up very nicely formatted.
>>>
>>>Here is the beginning of my
>>>
>>>DBFToExcelWithMemo procedure
>>>
>>>lcTestDB = ADDBS(SYS(2023)) + 'Temp.dbf'
>>> COPY TO (lcTestDB)
>>>
>>> tcXLSFileName = FORCEEXT(tcXLSFileName, 'XLS')
>>>
>>>*-- Create Ole Automation with Excel
>>> loExcel = CREATEOBJECT("Excel.Application")
>>>*-- Open XLS File
>>> WITH loExcel
>>> .ScreenUpdating = .F.
>>> .DisplayAlerts = .F.
>>> .WorkBooks.ADD()
>>>
>>> lnCounter = 0
>>>
>>> VFP2Excel(lcTestDB,;
>>> 'select * from Temp',;
>>> .ActiveWorkBook.ActiveSheet.Range('A1'))
>>>
>>>As I said, if at the time I run the process, I have local database opened, everything is OK.
>>>
>>>However, when I have my production database opened (open database myProductionDatabase) before running the above code it produces this error
>>>
>>>03/03/2009 09:13:42 PM Error while creating Excel file Error: 1426
>>>LineNo: 346
>>>Message: OLE error code 0x80004005: Unspecified error.
>>>Procedure: vfp2excel
>>>Details: 80004005: Unspecified error
>>>StackLevel: 5
>>>LineContents: toRange.Offset(1,0).CopyFromRecordSet( loRS )
>>>
>>>I don't see the connection between the code above and the fact which database is opened at the moment.
>>>
>>>Could you please help me to figure this out?
>>>
>>>Thanks in advance.
>>
>>
>>lcTestdb = SYS(2023)
>> COPY TO (addbs(m.lcTestDB)+'temp')
>>
>>Cetin
>
>Cetin,
>
>I've tried with the change you suggested and got the same problem. It does work using local database and it doesn't work if my database is production. I don't understand why the database matters if I'm trying to use free table in the temp directory.
It doesn't. Probably you have some code causing it.
Cetin