An alternative to the high-resolution graphic export is the screenshot-quality
This is better suited for graphs that you want to use in digital media,
e.g. in e-mails or presentations. One important difference between
screenshot-quality export and high-resolution export is that the former
produces ‘anti-aliased’ images where ragged lines are made smooth by
interpolating with shades of gray (and other hues). The high-resolution
export does not use anti-aliasing, so that text may appear ragged when
zoomed in on screen. However, for printing on paper, this mode is preferable.
I used to be able to export high quality graphics to PNG/TIFF files with this XL toolbox. In fact, this was one of the biggest uses for Daniel’s XL Toolbox that I had.
Lately in the past few versions I’ve noticed that this ability is lost. The “export with settings” produces large graphics, but they look horrible. I understand that this is because the toolbox lost the functionality to anti-alias them, so they now look jagged. Only the “screenshot” mode retains anti-aliasing, but it produces very small images.
I am confused why the new version removes functionality that already existed in previous versions. Not everyone wants to print the high quality graphics. These days there are very high resolution displays as well, and I’d like to obtain high resolution graphics that are properly anti-aliased so they don’t look jagged.
I was able to do this in previous versions of Daniel’s XL Toolbox, but for some reason this working feature was removed in newer versions.
The XL Toolbox uses functions built into Windows in conjunction with something called FreeImage to produce the high-resolution graphics. This has not changed between the ‘legacy’ versions (up to 6.60) and the ‘Next Generation’ versions (7.0 and up). What did change was the programming language of the XL Toolbox: It used to be Visual Basic for Applications, and now it is the state-of-the-art .NET technology (C#).
So, in theory, because the underlying technology is the same, the graphics should look the same whether they have been produced with the legacy Toolbox or the Next Generation.
Having said that, I have received a similar comment from a user a little while ago. Unfortunately, for me the graphics look fine, which makes me wonder whether there are issues pertinent to the specific version Windows that Excel and the Toolbox are installed on.
My primary use case is to produce print-quality graphics, where smoothing is not desired. In fact, I am a little worried because currently all of the graphics exported with the XL Toolbox are smoothed (zoom in to see). After playing with the code a little tonight, I think I have found a way to obtain graphics that are not smoothed at all, and this technique might lead to some sort of user preference setting for the XL Toolbox.
If you want to send me an example graphic that you are not happy with, you can send me a private message by clicking on my user name in the forum. I could then have a look at it.
I have been happy with the toolbox export feature.
However I now cannot use it.
I get the following error:
‘System.__ComObject’ does not contain a definition for 'Copy’
I am using Windows 10
Can you help?
I installed the add-in to produce high-quality figures from diagrams for scientific publications. Unfortunately, the text format of the axes is very pixelly and unacceptable. I also would like to see JPG format included. Thanks, Tom
Tom, unfortunately the way that Windows renders the graphics in memory appears to have changed. See my previous post in this thread:
Could you please send me a high-res version of your image (e.g. by private message, click on my user name). The one in the forum was scaled to 1004x570 which of course does look a bit odd on screen (compare with screenshot-quality export, which produces aliased bitmaps that agree much better with on-screen display).
You could also try out the legacy 6.70 version. This was programmed in Visual Basic. It uses the exact same functions that are built into the Windows operating system to obtain the graphics, but as I wrote above, the results does look a bit different. I have never found out the reason for that. Old versions are still available at https://sourceforge.net/projects/xltoolbox/files
Having said all that, I have lately produced vector graphics rather than bitmap graphics for grant applications and publications, and frankly, I believe that this is the way to go. Of course, this requires a totally different tool chain. My main tool to produce graphics is now R with ggplot2. However, it’s also possible to get vector graphics from Excel, see
As for the JPG format, it would be easy to add JPG as a target file format, but I had made the decision to omit this format deliberately – what journal would accept JPGs for production?
Is it possible to define a default path for saving graphics when using the “Batch Export” functionality? I would like to fully automate the capture of a high-resolution graphic of a Sheet. I apologize if my question is unclear or it has been answered before (I was not able to find data on this).
what do you mean by “fully automate”, do you use VBA or .NET?
With VBA, you can make use of the ExportSelection API method; see www.xltoolbox.net/api for an example for using the API. You would have to loop over your graphics in your VBA code and call the ExportSelection method for each graphic. It’s up to you to define the export path and file name.
With .NET, you may be successful with referencing the xltoolbox.dll assembly. This would allow you to trigger a batch export via the XLToolbox.Export.BatchExporter class.