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

Ability to convert a sheet or a group of sheets from an Excel file #192

Open
njz3 opened this issue Apr 25, 2022 · 4 comments
Open

Ability to convert a sheet or a group of sheets from an Excel file #192

njz3 opened this issue Apr 25, 2022 · 4 comments

Comments

@njz3
Copy link

njz3 commented Apr 25, 2022

Feature request: convert only a single sheet, or a group of sheets in an excel file.
For exemple, given a file with 3 sheets (tabs): Sheet1, Sheet2, Sheet3, being able to convert/print only a given sheet to a PDF, or print a selection of sheets.

@github-actions
Copy link

Thank You for the Issue. I will try to get to look at it as soon as I can.

@tobya
Copy link
Owner

tobya commented Apr 25, 2022

Thanks for taking the time to log the request.

I'll look at it. If you found the VBA method to make this happen it would speed up progress.

@njz3
Copy link
Author

njz3 commented Apr 25, 2022

I guess it is this VB function:
https://docs.microsoft.com/en-us/office/vba/api/excel.sheets.printout

In particular this method where the selected sheet is specified:
Worksheets. ("sheet1").PrintOut From:=2, To:=3

@tobya
Copy link
Owner

tobya commented Apr 26, 2022

Seems by selecting the sheet first you can output only that sheet

    Sheets("Sheet1").Select
    ActiveWorkbook.Save
    ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "C:\Users\tobyl\OneDrive\Book sdfasf1.pdf", Quality:=xlQualityStandard, _
        IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
        True

I'll try and do it when i can

@tobya tobya modified the milestones: Long Finger, V1.8 Apr 26, 2022
@tobya tobya modified the milestones: V1.8, V1.84 Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants