Last active
November 5, 2018 05:48
-
-
Save RuanAragao/a3334722f55f2361d617ae0a3077de9b to your computer and use it in GitHub Desktop.
Converte ROW to COLUMN CSV TABLE
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Converte ROW to COLUMN CSV TABLE</title> | |
</head> | |
<body> | |
<input id="txt"> | |
<button id="btn">run</button> | |
<textarea name="done" id="done" cols="30" rows="10"></textarea> | |
<script> | |
var done = document.getElementById('done'); | |
var btn = document.getElementById('btn'); | |
btn.onclick = function(e) { | |
var text = document.getElementById('txt').value; | |
text = text.replace(/\t/g, "\n"); | |
console.log(text); | |
done.value = text; | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment