private var file:FileReference = new FileReference();
private var myString:String = new String
private var sTemp:String = new String
private var inti:Number
private var intCountDash:Number
private function ExporttoCSV():void{
myString = "Cost, Attribute, Change, PV, Level, ROI\r\n"
for each( var obj:Object in myData )
{
for each( var obj2:Object in obj )
{
intCountDash = 0;
var encr_int: Number=0;
trace(String(obj2));
for (inti=0; inti < String( obj2 ).length; inti++)
{
if(String( obj2 ).charAt(inti) == '-')
{
intCountDash = intCountDash + 1;
}
}
if (sTemp != "")
{
if (intCountDash !=4)
{
if (String( obj2 ) == "↑")
{
sTemp += "," + "Increased from Current";
}
if (String( obj2 ) == "↓")
{
sTemp += "," + "Decreased from Current";
}
if (String( obj2 ) == "↔")
{
sTemp += "," + "No Change";
}
if ((String( obj2 ) != "↑") && (String( obj2 ) != "↓") && (String( obj2 ) != "↔"))
{
sTemp += "," + String( obj2 )
}
}
}
else
{
sTemp = String( obj2 )
}
}
myString += sTemp + "\r\n";
trace(myString);
sTemp = "";
}
//var test:String = "Hello World, By World"
file.save(myString,'Report.txt');
}
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.