Created
December 3, 2013 08:02
-
-
Save anunay/7765606 to your computer and use it in GitHub Desktop.
JavaScript : Create CSV File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fullList = []; | |
$(".list-wrapper").each(function() { | |
var tempStr = ""; | |
tempStr = '"' + $(this).find(".company-list-name a").text() + '"'; | |
tempStr += ',"' + $(this).find(".profile-update").text() + '"'; | |
tempStr += ',"' + $(this).find(".company-focus").text() + '"'; | |
fullList.push(tempStr); | |
}); | |
var output = fullList.join('\n'); | |
var uri = 'data:application/csv;charset=UTF-8,' + encodeURIComponent(output); | |
window.open(uri); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment