Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-10-2009, 10:10 AM   #1
salah
Registered User
 
Join Date: Jun 2009
Posts: 1
Default [AS3] an interactive cd rom using xls file

Hello

I want creating an interactiv cd rom using xls file, is it possinble to read data on an swf animation from an excel file? if the answer is yes can you tell me how can i do that, please?
Thank for reading my message
salah is offline   Reply With Quote
Old 06-11-2009, 09:09 PM   #2
northcode
Senior Member
 
northcode's Avatar
 
Join Date: Apr 2002
Location: Ottawa, Ontario, Canada
Posts: 419
Default

If you use SWF Studio to build the EXE for your CD then you can make use of our ADO plugin to read XLS files like this...

Code:
ssCore.init();

ssDefaults.synchronousCommands = true;

function showResult(f, r)
{
   ssDebug.trace(f + ": " + r.success);	   
   
   if (r.success)
   {
      if (r.result != undefined)
         ssDebug.trace("result: " + r.result);
   }
   else
   {
      ssDebug.trace("error: " + r.Error.code + ":" + r.Error.description);
      ssDebug.trace("adoError: " + r.adoError);
   }
   
   ssDebug.trace("");
}

s = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+ssGlobals.ssStartDir+"\\test.xls; Extended Properties=\"Excel 8.0;HDR=No\"";

r = ssCore.ADO.setConnectString({connectString: s}); 
showResult("ADO.setConnectString", r);

r = ssCore.ADO.setSQL({sql: "SELECT * FROM [sheet1$]"});
showResult("ADO.setSQL", r);

r = ssCore.ADO.setRowFormat({format:"DLM"})
showResult("ADO.setRowFormat", r);

r = ssCore.ADO.open();
showResult("ADO.open", r);

r = ssCore.ADO.moveFirst({});
showResult("ADO.moveFirst:", r);

if (r.success)
{
	results.text = r.result;
}
I've attached an example. You'll need to download SWF Studio to try this (there's a FREE trial version). The ZIP file contains an SPX file (SWF Studio self-extracting project) which contains the source FLA and an example XLS file. Just install SWF Studio and then double click on the SPX file to open the project, press the Build button and you can test the new EXE that reads the XLS file.
northcode is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[AS3] Load this XML file in to a list component Gamefreak88 Components 3 12-13-2008 09:09 AM
[AS3] small file size mainegate Components 6 08-08-2008 07:12 PM
AS3 component instantiation with dynamic variable component file name RR_QQ ActionScript 3.0 4 05-15-2008 05:53 AM
How do I save a PDF file from a Flash-based CD Rom Interface? fsborea Other Flash General Questions 1 05-24-2005 11:38 PM
help with save to php padone Server-Side Scripting 6 05-21-2005 11:29 PM


All times are GMT. The time now is 02:04 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.