save-as

VBA script that saves excel range as pdf

做~自己de王妃 提交于 2019-12-03 07:48:36
问题 I tried implimenting a range into my code, but I'm having no luck. I'd like to be able to have a script in vba to 'save as' a specific sheet or specific range to pdf. Any help would be much appreciated. Here is what I've been working with: ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ "c:\Book1.pdf", Quality:= _ xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _ OpenAfterPublish:=True Thanks, 回答1: you have the code, just use a range instead of

Save MATLAB figure with different background color

若如初见. 提交于 2019-12-03 05:27:58
I want to print a MATLAB figure with a dark background and white labels. If I use the print or saveas command I lose somehow the colors. The plot symbols are dark again and the background is white. points = rand(100,3); plot3(points(:,1),points(:,2),points(:,3),'*w') grid on set(gca,'Color',[0.5 0.5 0.5]) saveas(gcf,'test1','pdf') saveas(gcf,'test2','png') print(gcf,'test3.pdf','-dpdf') All three test files end up being wrong. If I choose "Save As" in the figure menu I am able to save the figure correctly. Any ideas how to resolve the issue? To keep the background as in your figure, use the

VBA script that saves excel range as pdf

断了今生、忘了曾经 提交于 2019-12-02 21:15:55
I tried implimenting a range into my code, but I'm having no luck. I'd like to be able to have a script in vba to 'save as' a specific sheet or specific range to pdf. Any help would be much appreciated. Here is what I've been working with: ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ "c:\Book1.pdf", Quality:= _ xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _ OpenAfterPublish:=True Thanks, you have the code, just use a range instead of activesheet e.g. Sheets("Sheet1").Range("B2:H28").ExportAsFixedFormat ... 来源: https://stackoverflow.com/questions

VBA - choose save as from the frame notification bar of internet explorer

回眸只為那壹抹淺笑 提交于 2019-12-01 14:02:34
I am trying to download a file with save as through the frame notification bar of internet explorer. However after doing a lot of searches, I have only found solutions to click save on the frame notification bar. So far I have been trying to save as the file on the sample site: http://www.tvsubtitles.net/subtitle-114117.html with the following code: ' Add referenses ' Microsoft Internet Controls ' Microsoft HTML Object Library ' UIAutomationClient (copy file from C:\Windows\System32\UIAutomationCore.dll to Documents Folder) #If VBA7 Then Private Declare PtrSafe Function FindWindowEx _ Lib

VBA Macro to download multiple files from links in IE

让人想犯罪 __ 提交于 2019-12-01 13:59:57
I want to download multiple files from a list of links. The website where I find the links is protected. This is why I want to use IE (using the current session/cookie). The target of each link is a xml file. The files are too large to open and then save. So I need to save them directly (right-click, save target as). The list of links looks like this: <html> <body> <p> <a href="https://example.com/report?_hhhh=XML"Link A</a><br>> </p> <p> <a href="https://example.com/report?_aaaa=XML"Link B</a><br>> </p> ... </body> </html> I want to loop through all links and save each target. Currently I

VBA - choose save as from the frame notification bar of internet explorer

前提是你 提交于 2019-12-01 12:58:16
问题 I am trying to download a file with save as through the frame notification bar of internet explorer. However after doing a lot of searches, I have only found solutions to click save on the frame notification bar. So far I have been trying to save as the file on the sample site: http://www.tvsubtitles.net/subtitle-114117.html with the following code: ' Add referenses ' Microsoft Internet Controls ' Microsoft HTML Object Library ' UIAutomationClient (copy file from C:\Windows\System32

VBA Macro to download multiple files from links in IE

北城以北 提交于 2019-12-01 12:56:31
问题 I want to download multiple files from a list of links. The website where I find the links is protected. This is why I want to use IE (using the current session/cookie). The target of each link is a xml file. The files are too large to open and then save. So I need to save them directly (right-click, save target as). The list of links looks like this: <html> <body> <p> <a href="https://example.com/report?_hhhh=XML"Link A</a><br>> </p> <p> <a href="https://example.com/report?_aaaa=XML"Link B<

Prompting user to save file using a 'Save-as' dialog?

你说的曾经没有我的故事 提交于 2019-11-30 20:17:57
I currently have this code: function download(filename, text) { var pom = document.createElement('a'); pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); pom.setAttribute('download', filename); pom.click(); } download('test.html', string); The string contains a lot of html code that gets written in an .html file. The above code is working perfectly: On a button click, the browser (chrome) automatically downloads an html file with the string content written in it. Now, what I want to do is, instead of chrome downloading the file automatically, it should open

How to download, zip and save multiple files with Javascript and get progress?

隐身守侯 提交于 2019-11-30 13:28:07
问题 I'm creating a Chrome extension that needs to download multiple files (images and/or videos) from a website. These files may have a huge size, so I want to show the download progress to the user. After some research I found that currently a possible solution might be: Download all the files with XMLHttpRequests. When downloaded, zip all the files into one archive with a JavaScript library (eg. JSZip.js, zip.js). Prompt the user to save the zip with SaveAs dialog. I'm stuck at passage 2), how

How to download, zip and save multiple files with Javascript and get progress?

梦想与她 提交于 2019-11-30 07:31:43
I'm creating a Chrome extension that needs to download multiple files (images and/or videos) from a website. These files may have a huge size, so I want to show the download progress to the user. After some research I found that currently a possible solution might be: Download all the files with XMLHttpRequests. When downloaded, zip all the files into one archive with a JavaScript library (eg. JSZip.js, zip.js). Prompt the user to save the zip with SaveAs dialog. I'm stuck at passage 2), how can I zip the downloaded files? To understand, here is a code sample: var fileURLs = ['http://www.test