Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to save ODS HTML5 results locally (as a .html file) #546

Closed
clangsmith opened this issue Oct 3, 2023 · 0 comments · Fixed by #550
Closed

Provide a way to save ODS HTML5 results locally (as a .html file) #546

clangsmith opened this issue Oct 3, 2023 · 0 comments · Fixed by #550
Assignees
Labels
feature request New feature or request

Comments

@clangsmith
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As a user, I would like to be able to easily download the ODS HTML5 results that are generated for me when I submit my code. (Randy Collica reached out to me via email, asking if it was possible to accomplish.)

Describe the solution you'd like
With focus in the desired Result tab, ideally I would like to be able to click File->Save As, and then save the ODS result as a .html file on my local machine. If we can't integrate into File->Save As, then having a command (perhaps "Save As" or "Download") on the context menu (when you right-click inside the ODS results) would suffice as well.

Describe alternatives you've considered
While there is not currently an easy way to accomplish this. There is a way, but it is round-about…

If you explicitly include a filename and ODS statement, you can write the ODS results to an HTML file in SAS Content. For example:

filename myout filesrvc folderpath='/Public/ademo/' filename='odsresults.html';
ods html5 file=myout;

title "Histogram of Sepal Length";
proc sgplot data=sashelp.iris;
histogram sepallength / group=species transparency=0.5 scale=count;
density sepallength / type=normal group=species;
keylegend / location=inside position=topright across=1;
run;
title;

ods html5 close;

Then, in the Explorer section of the SAS pane in vscode, navigate to the folder you stored the file above, click the file (ex. odsresults.html) to open it, select File->Save As, then save it to desired location. (It would be nicer if there was a "Download" context menu item in the Explorer, but there is not currently. I'll add a separate feature request for that.)

Additional context
I briefly looked at the current code... we are reading the HTML from the resultant file on the server, then placing the HTML directly into a Webview panel. If Webview doesn't or can't be made to save the HTML, perhaps we could still implement Save As by getting the HTML out (or store it when first set), then write that to a file.

Environment
SAS Viya 4 2023.09

@clangsmith clangsmith added the feature request New feature or request label Oct 3, 2023
@scottdover scottdover linked a pull request Oct 6, 2023 that will close this issue
3 tasks
@2TomLi 2TomLi assigned scottdover and unassigned clangsmith and 2TomLi May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants