I have evaluated your scenario/ case using your template file and sample code. Well, there is an error in your code. There is a hidden sheet in your template file and you are actually referring to that sheet (at zero indexed position). Please change the line of code from your code segment:
i.e.,
Good to know that you have sorted it out. And, yes, you should correct your code as you have done now.
Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.
If you are using EMF image file format type, then it will render image with enhanced quality because EMF is vector graphic type. If you need to use PNG as image format, you may try to set a larger horizontal/vertical resolutions in ImageOrPrintOptions. See the following sample code to get PNG image with better quality:
e.g Sample code:
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.