Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CSV file to Array Problem

New Here ,
Mar 11, 2013 Mar 11, 2013

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

TOPICS
ActionScript
606
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 11, 2013 Mar 11, 2013

You should only need to use the split() method of the String class to turn the csv text into an array.

Translate
LEGEND ,
Mar 11, 2013 Mar 11, 2013

You should only need to use the split() method of the String class to turn the csv text into an array.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 04, 2013 May 04, 2013
LATEST

Thank you Ned. We ended-up doing a database instead but I appreciate your help. I hope you have a great weekend.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines