Copy link to clipboard
Copied
I have been struggling with importing a csv file and creating an array. I am able to have the file display with the commas in a dynamic text box but can't figure out how to use the commas to separate the data into grids.
If anyone can help it wouldbe very much appreciated. I have two weeks to complete this and have spent countless hours researching a solution. Thank you in advance.
My current code is:
var loader: URLLoader = new URLLoader();
loader.load(new URLRequest("external.csv"));
loader.addEventListener(Event.ÂCOMPLETE, onComplete);
function onComplete(event:Event):void
{
external_txt.text = event.target.data;
}
The comma delimited file is "external.csv" and the dynamic text field's name is "external_txt"
Thanks again
You should only need to use the split() method of the String class to turn the csv text into an array.
Copy link to clipboard
Copied
You should only need to use the split() method of the String class to turn the csv text into an array.
Copy link to clipboard
Copied
Thank you Ned. We ended-up doing a database instead but I appreciate your help. I hope you have a great weekend.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now