I always advice against general fields, but I know that in some cases you must use them. Anyway, I have two comments:
1. You don't need to Select a table after creating it, it will automatically be selected after it has been created.
2. APPEND GENERAL excelfile FROM (tcExcelFile) ?
>Hi,
>I try to create template table and append general field to use excel features inside foxpro form.
>And... it does not work for me.. the General fields always stay blank
>What do I wrong?
>
>
> PROCEDURE OpenExcelFile
> LPARAMETERS tcExcelFile
> LOCAL lcTmpTable as String
> LOCAL lcTmpAlias as String
> lcTmpTable = ADDBS(SYS(2023))+SYS(2015)
> CREATE TABLE (lcTmpTable) FREE (excelfile G)
> lcTmpAlias = JUSTSTEM(lcTmpTable)
> SELECT(lcTmpAlias)
> APPEND BLANK
> APPEND GENERAL excelfile FROM tcExcelFile
>*!* BROWSE
> Thisform.oleObject.ControlSource = ALLTRIM(lcTmpAlias)+".excelfile"
> THisform.Refresh()
> ENDPROC
>
>
>When I made BROWSE... I can see.. General field still empty.
>File exist on the disk 100% :)
>
>Thanks
>Denis