Print Excel Worksheet Workbook

0 votes

I'm attempting to make a C# Winform app perform better.

Previously, it took 100000 milliseconds to generate an Excel file (using Office.Interop.Excel). It takes roughly 5000ms when using ClosedXml. Really Excellent But I have to print this Excel file now (only a Worksheet or the entire workbook)

I was doing this before (using office interop) :

public void PrintCurrentWorksheet()
{
    this._activeWorksheet.PrintOut(Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
}
public void PrintWorkbook()
{
    this._activeWorbook.PrintOut(Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
}

However, XLWorkbook and IXLWorksheet are the new types of _activeWorkbook and _activeWorksheet. The Printout method does not exist. Since OpenXml is not dependent on Excel, I assume there is no print method, which I was unable to find. Am I correct?

Oct 31 in Others by Kithuzzz
• 20,660 points
45 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Others

0 votes
1 answer

How do I protect all worksheet in an Excel workbook with a single click?

VBA Code : Dim ws as Worksheet Dim pwd ...READ MORE

answered Oct 22 in Others by narikkadan
• 37,660 points
32 views
0 votes
1 answer

Referencing an Excel file, workbook, worksheet in C#

Try the following code. using System; using System.Data; using Excel ...READ MORE

answered Nov 19 in Others by narikkadan
• 37,660 points
21 views
0 votes
1 answer

How to print an Excel Sheet using VBA with Nitro PDF Creator in Excel 2016

you can use the built-in excel facilities ...READ MORE

answered Sep 24 in Others by narikkadan
• 37,660 points
117 views
0 votes
1 answer

Print chosen worksheets in excel files to pdf in python

In the simplest form: import win32com.client o = win32com.client.Dispatch("Excel.Application") o.Visible ...READ MORE

answered Sep 24 in Others by narikkadan
• 37,660 points
216 views
0 votes
1 answer

Excel offset where reference is to another worksheet

Solution:  =OFFSET((INDIRECT(ADDRESS(1,1,,,"Sheet2")),ROW(),0,,) References: OFFSET(starting point, num of rows, num ...READ MORE

answered Oct 8 in Others by narikkadan
• 37,660 points
105 views
0 votes
1 answer

c#, Microsoft Interop Excel , change font style for s selected range

Change your code to this: worksheet.get_Range("B3", "B4").Cells.Font.Name = ...READ MORE

answered Oct 31 in Others by narikkadan
• 37,660 points
45 views
0 votes
1 answer

Activate last excel worksheet on worksheetlist with closedxml in c#

This will answer your question :  Changing sheet ...READ MORE

answered Nov 5 in Others by narikkadan
• 37,660 points
65 views
0 votes
1 answer

Microsoft.Office.Interop.Excel for Office 2007

Each client must install the  2007 Microsoft ...READ MORE

answered Nov 5 in Others by narikkadan
• 37,660 points
49 views
0 votes
1 answer

Generate a flat list of all excel cell formulas

Hello, you'll have to follow certain steps ...READ MORE

answered Feb 18 in Others by gaurav
• 22,040 points
78 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP