>I found the issue when calling the Demo() method a second time. The first step is to create the workbook reference:
>
>
>lnWb = this.CreateWorkbook("ExcelTest.xlsx")
>
>
>This returns a 'handle' to the workbook object (1 based index) that is created. If it fails or if the same workbook already exists, then 0 is returned to denote a failure. So, executing Demo() a second time this method returns 0 (no workbook created). I did not include any checking for success in the demo. I have now added the following:
>
>
>lnWb = this.CreateWorkbook("ExcelTest.xlsx")
>IF lnWb = 0
> RETURN False
>ENDIF
>
Hi Greg,
Did you get my email? I sent both of your responses to Mark, but it may be better if you communicate with him directly as I haven't tried your library myself yet (in another project of mine I used Craig Boyd's library and it was a while ago, I haven't worked on lots of VFP related projects recently).
If it's not broken, fix it until it is.
My Blog