I think it was not a good idea in the first place to derive csv from urlloader, because it does not allow it to work with local files.
So my advice, given that csvlib is open source, is to extract the useful parsing code from the lib, and write your own Maurice ________________________________________ De : Oleg Konovalov [[email protected]] Envoyé : lundi 23 juin 2014 21:14 À : [email protected] Objet : Re: FileReference and URLRequest Forgot to mention: class CSV extends URLLoader, that is where csv.load(request:URLRequest) coming from. On Jun 23, 2014 3:02 PM, "Oleg Konovalov" <[email protected]> wrote: > Hi, > > I am trying to implement import CSV data into Flex Web app using CSVLIB, > so it allows me to parse commas inside cells when it is surrounded by > double quotes. > It seems that the only way to load data in CSV is: csv.load(new > URLRequest(url:String)). > So if I select some file from my local drive, say file1.csv from c:/temp, > how can I put it in URL. > File reference returns only selected filename without the path when I use > fr.browse(). fr.name() > And fr.browseForDirectory() is AIR only. > So how can I get a full path+fileName to pass to URLRequest? > > Please help! > > TIA, > Oleg > P.S.: no ByteArray used in CSVLib. > Using Flex 4.5.1 >
