tags:

views:

47

answers:

1

HI,

I have a requirement to read CSV/Xlsx file in my FLEX AIR.

var strFilePath :String = File.applicationDirectory.nativePath + "\Test.xlsx"; var recurFile :File = new File(strFilePath);
var stream :FileStream = new FileStream(); stream.open(recurFile, FileMode.READ); var content :String = String(stream.readUTFBytes(stream.bytesAvailable)); But variable content always has "PK.." .. is some hexadecimal character.

I tried to laod using URLLoader but still got same result.

Please give me correct code to read xlsx/csv files.

A: 

If you are still looking for a response to this. You might want to check out the following library:

http://code.google.com/p/as3xls/

CSV files are a lot easier to handle, and there are some good looking tutes if you Google for 'Read CSV file in AIR'

HTH,

Rob

Rob Parkhill

related questions