Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to insert image in textbox.

Hi guys ,

plz find the attachment.

I have an excel file having filelds imgID,Location containing 3 images and there location.
After loading i get two fields imgID and location.

Now i want to use textbox to display image after cliking in ImgID listbox.

Plz help me how to get an image in textbox.

Thanks

Hitesh

14 Replies
Not applicable
Author

Hiii see the attached file.

Not applicable
Author

This is your script:

image:

bundle LOAD ImgID,

                     Location

FROM [Image Ex.xlsx] (ooxml, embedded labels, table is Sheet1);

********************************************************************

From the above script, I can see that your excel file does not carry any path, plz mention the path, don't just type as Image Ex.xlsx.

Perform the following steps to load the excel file in your script:

Step-1: Suppose you have placed the excel file in your desktop, in theis case I have used your excel sheet in my desktop.

Step-2: Open the script editor by pressing(Ctrl + E), then click on "Table Files" Button.

Step-3: Select the excel file where your have placed it.ie., look in desktop(in my case) and click on Open.

Step-4:  Here you can now see you excel sheet contents. Select the 'Embedded labels' under "Labels" and click on finish button.

Step-5: Your script is now ready, give ur table a label and before the load statement use the keyword 'Bundle'.

For your reference, i'm pasting my script below:

image:

Bundle LOAD ImgID, Location

FROM (ooxml, embedded labels, table is Sheet1);

Step-6: After step-5, create a text box and go to its properties and in the expression editor type the following:

=Info(ImgID)

Step-7: Change the Representation to Image in drop down.By default, it is Text. Click OK.

Step-8: When u now click on your ImgID, u will now able to view you image.

Done...Cheers!!!

Not applicable
Author

Hi Deepak:

Thank you very much for your post.

When I do bundle load, the table disappeared and I cannot find the ImgID field.

Do you know why?

Thank you.

PC

santiago_respane
Specialist
Specialist

Hi,

it is very simple, use bundle load as follows.

In script:

bundle load * inline [

imgName,img

img1,C:\Temp\srespane\Education\QV Samples\Infographics\img1.png

img2,C:\Temp\srespane\Education\QV Samples\Infographics\img2.png

];

Then in your text object you will need to add the desired image as follows (don't forget to set Image as value for Representation in text object properties General tab):

='qmem://imgName/img1' //For image 1

='qmem://imgName/img2' //For image 2


Please let me know if this helps.

kind regards,

ravikumar89
Contributor II
Contributor II

Hi Michael,

Working exactly to my requirement..... thanks alot.