Excel Interop Print
问题 I need to print a selected area of an excel sheet (which I selected with Range.Select()) using the following print settings: Printer: Microsoft XPS Document Writer Print Selection Landscape Orientation A4 Normal Margins Fit Sheet on One Page How can I achieve this using _Worksheet.PrintOut or _Worksheet.PrintOutEx? Thanks in advance! 回答1: Try this ( TRIED AND TESTED ) I am assuming that you have set reference to Excel and have already declared your objects like Microsoft.Office.Interop.Excel