Welcome!

From the Trenches of the Enterprise Software

Yakov Fain

Subscribe to Yakov Fain: eMailAlertsEmail Alerts
Get Yakov Fain via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: RIA Developer's Journal, Java Developer Magazine

RIA & Ajax: Article

We've Taught Adobe Flex and Microsoft Excel Talk To Each Other

We are finishing writing our book on RIA with Flex and Java

From Farata Systems FlexBlog

We are finishing writing our book on RIA with Flex and Java , and the last chapter is called "Integration with External Applications".  It's sixty five pages of some advanced read. After writing this chapter one of us suggested that it would be easier to re-write Excel from scratch. It's not straightforward coding, but the results are good. After covering some basics  about ExternalInterface and how it enables bi-directional communications between JavaScript inside HTML page and embedded Flex application, this chapter leads you through jungles of Flash technologies such as External API and LocalConnection as well as through maze of Microsoft old timers like ADODB and OWC. We have been coding in VBA, JavaScript, XSLT, not to mention the ActionScript, of course.

We've also provided the code for  a more complex example of integration with external applications, namely Microsoft Excel. These days the data entry or analytical applications with no Excel integration are simply hard to find. Be that saving of data in native Excel format or CSV, accepting data entered in Excel or dynamically creating Excel Charts based on the database queries – we see it everywhere. Microsoft Excel is one of the most popular business applications ever .

This  solution involves two ActiveX objects embedded in an HTML page with instant as well as on demand data synchronization between the objects. One of these ActiveX objects is the Flash Player control, executing Flex application. The second ActiveX is a Spreadsheet from Microsoft Office Web Components (OWC). You may think about Spreadsheet as of miniature Microsoft Excel application running inside the HTML page.

Disclaimer: This particular sample works under IE in  Windows XP, but has some issues on Windows 2000. I'm sure, if you are still running Window 98 you may face some issues as well, which we'll be happy to fix for its customers.


Meanwhile try to make changes in the left (Flex) and right  (Excel) spreadsheets and the data should be replicated back and forth.  We'd appreciate any suggestions/critique of this application.

Application like this opens the doors to some interesting project ideas: we also know how to generate and execute formulas on the fly, provide proper reporting and printing, and more. But that's later. Let's finish the book first.

 

More Stories By Yakov Fain

Yakov Fain is a Java Champion and a co-founder of the IT consultancy Farata Systems and the product company SuranceBay. He wrote a thousand blogs (http://yakovfain.com) and several books about software development. Yakov authored and co-authored such books as "Angular 2 Development with TypeScript", "Java 24-Hour Trainer", and "Enterprise Web Development". His Twitter tag is @yfain

Comments (3) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
devg 08/01/08 08:28:04 PM EDT

Using two activex controls etc seems rather complicated. Also, you can not access excel files whihc do not have this control embedded. It maybe simpler to just call an external process (using an http or webservice call) that can read/write to any excel file. See http://www.d-w-systems.com/products.html for instance.

j j 09/19/06 02:24:55 PM EDT

AJAX World Magazine: We've Taught Adobe Flex and Microsoft Excel Talk To Each Other

j j 09/19/06 01:59:51 PM EDT

We are finishing writing our book on RIA with Flex and Java , and the last chapter is called 'Integration with External Applications'. It's sixty five pages of some advanced read. After writing this chapter one of us suggested that it would be easier to re-write Excel from scratch. It's not straightforward coding, but the results are good. After covering some basics about ExternalInterface and how it enables bi-directional communications between JavaScript inside HTML page and embedded Flex application, this chapter leads you through jungles of Flash technologies such as External API and LocalConnection as well as through maze of Microsoft old timers like ADODB and OWC. We have been coding in VBA, JavaScript, XSLT, not to mention the ActionScript, of course.