Skip to content

Instantly share code, notes, and snippets.

@RuanAragao
Last active November 5, 2018 05:48
Show Gist options
  • Save RuanAragao/a3334722f55f2361d617ae0a3077de9b to your computer and use it in GitHub Desktop.
Save RuanAragao/a3334722f55f2361d617ae0a3077de9b to your computer and use it in GitHub Desktop.
Converte ROW to COLUMN CSV TABLE
<!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