[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

Transfer data from a worksheet to a Flex embedded application

Asked by Guy2 in Adobe Flex, ActiveX, Microsoft Excel Spreadsheet Software

Tags: VBA, Flex, Error #2060: Security sandbox violation: ExternalInterface caller file:///XXX cannot access <unknown>.

Hi,

I would like to transfer data from an Office 2003 worksheet to a Flex application located on the same worksheet (ie Flash activeX inserted). To pass these data, I use the ExternalInterface API in the Flex framework.
All works fine if the Flex file (a SWF in fact) is not embedded into the Excel file. When I decided to embedd the Flex application into Excel, I met the folowing error:

SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C|/Program%20Files/Microsoft%
20Office/OFFICE11/EXCEL.EXE cannot access <unknown>.
      at flash.external::ExternalInterface$/_initJS()
      at flash.external::ExternalInterface$/call()
      at DisplayContainerData/GetExcelData()[E:\DisplayContainerData\src\DisplayContainerData.mxml:22]
      at DisplayContainerData/___DisplayContainerData_Button1_click()[E:\DisplayContainerData\src\DisplayContainerData.mxml:246]

I tried to play with activeX properties (allowScriptAccess and AllowNetworking) without success. How can I fix this error?


In the other hand, I must call Flex method in VBA code. I tried to use the CallFunction method of the Excel Shockwave activeX object, but it always fails. Here is the used syntax in my VBA code (the 'test' function exists in Flex code and is registered with the ExternalInterface.addCallback method):
Call ShockwaveFlash1.CallFunction("<invoke name=""test"" returntype=""xml""/> <arguments> <string>Hello World!</string> </arguments> </invoke>")
The reported error is:
"Run-time error '-2147467259 (80004005)': Method 'CallFunction' of object IShockwaveFlash' failed"
I have tried the same call with a dotNet application and it succeeded. How can I call a Flex function in Excel VBA code ?


Thanks.



[+][-]04/29/08 01:30 AM, ID: 21460449Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Adobe Flex, ActiveX, Microsoft Excel Spreadsheet Software
Tags: VBA, Flex, Error #2060: Security sandbox violation: ExternalInterface caller file:///XXX cannot access &lt;unknown&gt;.
Sign Up Now!
Solution Provided By: Guy2
Participating Experts: 0
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_2_20070628