<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 4 August 2014 11:18, Alessandro Gagliardi <span dir="ltr"><<a href="mailto:alessandro.gagliardi@glassdoor.com" target="_blank">alessandro.gagliardi@glassdoor.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I’d like to allow users to generate a CSV in a notebook that is hosted remotely and download that file to their local machine, perhaps through a widget (or some other way that doesn’t require the command line).</div>
<div><br>
</div>
<div>Is this possible? The closest thing I can think of is pandas’ to_clipboard method which could then be used to paste the data into a local spreadsheet, but that seems clumsy and prone to human error.</div></blockquote>
</div><br></div><div class="gmail_extra">It's perfectly possible so long as the kernel is running on the same machine as the notebook server (which is the default configuration). Just write the file, and then display an HTML link pointing to it using a relative URL.<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">to_clipboard won't work, because that sets the clipboard on the machine where the code is running, not on the user's machine.<br><br></div><div class="gmail_extra">
Thomas<br></div></div>