title: Swift/Firebase Converting the snapshots (JSON) into Excel
body: <p>does anyone here knows of a good method to convert Firebase data into excel format? Ideally I would like to do this by function call, such that I can pull the JSON database from Firebase and convert them into excel format. </p>
  
  <p>Taking my JSON from Firebase as an example:</p>
  
  <pre><code>Snap (-KQc-qqY3qc6ZQgQQ4EF) {
      DOB = "01/09/2016";
      purpose = "No purpose";
      name = "Adam";
      timeOfVisit = 1803;
      userID = LV6aANvLfAcTXTDpsZr5R4viUnE2;
  }
  </code></pre>
  
  <p>When a user taps a 'export to excel' button, I would like to grab the JSON file from Firebase and convert it to excel file. Subsequently I would like to send this file to the user via email.</p>
  
  <pre><code>@IBAction func exportToExcel(sender: AnyObject) {
      let dataSnapshot: FIRDataSnapshot! = self.database[indexPath.row]
      let databaseValues = dataSnapshot.value as! Dictionary&lt; String, AnyObject&gt;
  
      let name = databaseValues["name"] as! String!
      let time = databaseValues["timeOfVisit"] as! Int!
      let DOB = databaseValues["DOB"] as! String!
      let purpose = databaseValues["purpose"] as! String!
  
      // parse above variables into individual rows in excel file
  
  }
  </code></pre>