DocTo
DocTo copied to clipboard
Ability to convert a sheet or a group of sheets from an Excel file
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.
Thank You for the Issue. I will try to get to look at it as soon as I can.
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.
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
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