The Use of Flash and the Open XML SDK for JavaScript

This functionality is deprecated. I recommend using HTML5 only.

Return to the
Open XML SDK for JavaScript
Developer Center
For some time, the ability to load files from the local file system into local JavaScript variables, and to save files from local JavaScript variables to the local file system has been deemed to be a security risk. However, with the development of more and more powerful Web applications that use a lot of client-side JavaScript, the need to do this has increased. At the same time, security experts have decided, to a large extent, that if we place
certain limitations on loading and save files from/to the local file system, it is not a security risk.  The limitations are:

This is the direction being taken by the W3C committees.  The FileReader interface enables opening files, and the FileWriter API enables saving to the local file system.  However, these are works in progress.  Support is spotty.

In the mean-time, there is a work-around.  From Flash 10 onwards, it has been possible in ActionScript to read and write to the local file system (with the same limitations as listed above).  Further, there is interop between ActionScript and JavaScript so that it is easy to pass data both directions.  This means that it is possible to write a small Flash module that does the actual loading and saving of files, and then use those Flash modules from JavaScript.

You can find out more about this approach in the screen-cast Working with Open XML Documents using JavaScript.