开发者

Reading CSV/xlsx file in FLEX AIR

HI,

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

开发者_JS百科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.


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'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜