Notch Notch Manual 0.9.23
 Light | Dark
GetCSVFileContents()

GetCSVFileContents()

Purpose #

Gets the contents of a CSV as a 1-dimensional array, if the resource object is a CSV File resource. Otherwise returns a null object.

Syntax #

Array GetCSVFileContents();

Example #

function Update()
{ 
    csv = Document.FindResourceByName("test.csv");
    if(csv != null)
    {
        csvData = csv.GetCSVFileContents();
        for (a = 0; a < csvData.length; a = a + 1)
        {
            val = csvData[a];
            Log("entry " + a + ": " + val);
        }
    }
}