Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to add an Image via AddImage #82

Open
nmossvfp opened this issue Apr 2, 2023 · 2 comments
Open

Trying to add an Image via AddImage #82

nmossvfp opened this issue Apr 2, 2023 · 2 comments

Comments

@nmossvfp
Copy link

nmossvfp commented Apr 2, 2023

Hello

I am trying to add an image which is a legend to a specific row and column of my spreadsheet.
All aspects of creating my Excel using this class are succesful except for the Image add via the AddImage() method.

lcImageFile = "e:\graphics\newreport\legend.jpg"
lnWb = 1
THISFORM.vfpxlsx.AddImage(lnWb, 1, lcImageFile, "O",, 3, 0, 30, 0) && Positioned C30 cell

After tracing back to the Parent class I discoverered that _screen.SYSTEM does not exist, always returns "U" and therefore the bailout at RETURN 0

Code below from AddImage()
IF !PEMSTATUS(_SCREEN, "System", 5) .OR. VARTYPE(_SCREEN.System) <> "O"
RETURN 0
ENDIF

Any advice is appreciated.
Thanks

@ggreen86
Copy link
Owner

ggreen86 commented Apr 3, 2023 via email

@nmossvfp
Copy link
Author

nmossvfp commented Apr 3, 2023

Perfect!
Had no idea this was required.

Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants