10-11-20 05:06 PM
15-11-20 11:43 PM
18-11-20 01:09 PM
22-02-21 05:51 PM
30-06-23 12:30 PM
Hi Tony, I know this post is a few years old now but I was just wondering if you can remember if you figured out a way to fix this and if so how please. I am having the same issue as I need to paste an image to excel from a 3rd party website but can't get the paste function to work within the excel VBO. Thanks, Amy
30-06-23 01:51 PM
Hi Amy,
I have done something similar that may work.
I had to copy the Set Clipboard action in the Environment VBO and create a new one called Set Clipboard - Image (Attached). This then allowed the standard Excel Paste action to work. Feed in your image file saved from the website and it should do the trick.
Thanks
30-06-23 07:34 PM
Hi Amy,
Please add below action to the excel object. It should do your work.
<process name="__selection__MS Excel VBO - Extended" type="object">
<subsheet subsheetid="7dbfb4fc-fb9c-4bcb-a90e-da709a29d296" type="Normal" published="False">
<name>Insert image into cell</name>
<view>
<camerax>-157</camerax>
<cameray>-53</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<stage stageid="d2e58874-1fbb-4180-85d2-ae807e5b2d28" name="Insert image into cell" type="SubSheetInfo">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<display x="-195" y="-105" w="150" h="90" />
</stage>
<stage stageid="f5deaa2e-a79f-44ab-971c-26e7548d45c3" name="Start" type="Start">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-60" y="-180" />
<inputs>
<input type="text" name="Workbook Name" narrative="The name of the workbook in which the sheet exists." stage="Workbook name" />
<input type="text" name="Worksheet Name" narrative="The name of the sheet which should be activated." stage="Worksheet name" />
<input type="number" name="handle" narrative="The integer handle identifying the instance on which the worksheet which should be activated resides. " stage="handle" />
<input type="text" name="Cell reference" stage="Cellref" />
<input type="text" name="Image Path" stage="Image" />
</inputs>
<onsuccess>75f16bc1-6f30-4786-805a-0e648644f7ea</onsuccess>
</stage>
<stage stageid="75f16bc1-6f30-4786-805a-0e648644f7ea" name="Write Image" type="Code">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-60" y="-105" />
<inputs>
<input type="text" name="Workbookname" expr="[Workbook name]" />
<input type="text" name="Worksheetname" expr="[Worksheet name]" />
<input type="text" name="Cellref" expr="[Cellref]" />
<input type="text" name="Image" expr="[Image]" />
<input type="flag" name="Createifmissing" expr="[createifmissing]" />
<input type="number" name="handle" expr="[handle]" />
</inputs>
<outputs>
<output type="flag" name="sheetexists" stage="sheetexists" />
</outputs>
<onsuccess>7059cc70-cf5f-490b-a3cb-272afa613ced</onsuccess>
<code><![CDATA[Dim ws as Object = GetWorksheet(handle,workbookname,worksheetname,createifmissing)
sheetexists = ws IsNot Nothing
If sheetexists then
ws.Activate()
ws.Range(Cellref).Activate()
ws.Pictures.Insert(Image)
End If
]]></code>
</stage>
<stage stageid="71a21d1a-ee01-43ec-8163-9a8089a42545" name="Workbook name" type="Data">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-300" y="-15" w="120" h="30" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="30fcb284-99ed-462f-bbe9-8d801ba04e98" name="Worksheet name" type="Data">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-300" y="15" w="120" h="30" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="a506948b-b6b4-4db9-bcfb-e41cdb5a9d45" name="Cellref" type="Data">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-300" y="135" w="120" h="30" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="a99d6380-fe8c-451d-ad86-f87ee7366eaa" name="Image" type="Data">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-300" y="45" w="120" h="30" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="7f988ed6-3831-4851-8eb5-5fc1c1078b71" name="createifmissing" type="Data">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-300" y="75" w="120" h="30" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="b1e083ec-c166-4e77-b258-ec6e2908155e" name="handle" type="Data">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-300" y="105" w="120" h="30" />
<datatype>number</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="1f092d45-b2f8-4430-ac72-59f50ed48390" name="sheetexists" type="Data">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<display x="-165" y="-15" w="120" h="30" />
<datatype>flag</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="7059cc70-cf5f-490b-a3cb-272afa613ced" name="End" type="End">
<subsheetid>7dbfb4fc-fb9c-4bcb-a90e-da709a29d296</subsheetid>
<loginhibit />
<display x="-60" y="-15" />
<font family="Tahoma" size="10" style="Regular" color="000000" />
<outputs>
<output type="flag" name="success" stage="sheetexists" />
</outputs>
</stage>
</process>
03-07-23 08:17 AM
Thank you!
03-07-23 08:17 AM
That's great thank you!