-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
add to_pdf() support for Chart and Range #1708
Comments
Just stumbled across this issue and started coding a first iteration: https://github.com/FabianGoessling/xlwings If this is going in the right direction, i'd love to contribute, but so far this is blindly coded on a Mac without Excel installation. |
This would only make sense if it can be exported directly from Excel, without png in the middle (from what I can see, you're doing this). Something like this (it would export the whole sheet though which it shouln't, so not sure it'll work out: import xlwings as xw
from xlwings.constants import FixedFormatType, FixedFormatQuality
book = xw.books.active
book.sheets.active.charts[0].api[1].ExportAsFixedFormat(Type=FixedFormatType.xlTypePDF,
Filename=r'C:\Users\felix\Desktop\test.pdf',
Quality=FixedFormatQuality.xlQualityStandard,
IncludeDocProperties=True,
IgnorePrintAreas=False,
OpenAfterPublish=False) |
I agree, i totally missed the ExportAsFixedFormat method in the VBA Reference. If you add ''' before the export, your code does the job. |
gotcha, thanks for letting me know! |
If you didn't implement it already, I'll do it or at least make a first draft, so give me a sign. |
Feel free to go for it! |
No description provided.
The text was updated successfully, but these errors were encountered: