Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed May 17, 2017 11:04 pm

Hai, I have some kind a problem with my program. I'm new using this, so i'm sorry if asking this question. My problem is when i try to print excel document with spire. I have a problem with the syntax... I don't know why but my VS can recognize the properties PrintDialog and PrintDocument on workbook. Can you help me solve this problem because i realy need it for my project. Thank you for your consideration... This's my syntax for print the document (i use spire.xls ver 7.9) :
Code: Select all
private void button1_Click(object sender, EventArgs e)
        {
            Workbook workbook = new Workbook();
            workbook.LoadFromFile(@"..\..\Data\dbStok.xls");
            PrintDialog dialog = new PrintDialog();
            dialog.AllowPrintToFile = true;
            dialog.AllowCurrentPage = true;
            dialog.AllowSomePages = true;
            dialog.AllowSelection = true;
            dialog.UseEXDialog = true;
            dialog.PrinterSettings.Duplex = Duplex.Simplex;
            dialog.PrinterSettings.FromPage = 0;
            dialog.PrinterSettings.ToPage = 8;
            dialog.PrinterSettings.PrintRange = PrintRange.SomePages;
            workbook.PrintDialog = dialog;
            PrintDocument pd = workbook.PrintDocument;
            if (dialog.ShowDialog() == DialogResult.OK)
            { pd.Print(); }
        }

Image

AlClar1ty
 
Posts: 3
Joined: Wed Apr 12, 2017 1:32 am

Thu May 18, 2017 3:11 am

Dear AlClar1ty,

Thanks for your inquiry.
Sorry that Free Spire.XLS doesn't support print function. Please use the latest Spire.XLS Pack Hotfix Version:7.12.11. And we can offer you 1-month free licesne of Spire.XLS to help you remove the warning message and have a better evaluation on our products. Please contact sales@e-iceblue.com to get it if you need.
If there is any question, please let me know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri May 19, 2017 9:12 pm

Owh isee" thank you for your replied adn it's works now... Ok maybe I'll consider it first about your offer... :P

AlClar1ty
 
Posts: 3
Joined: Wed Apr 12, 2017 1:32 am

Mon May 22, 2017 1:33 am

Hello,

Thanks for your response. Please contact us if you have any questions.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.XLS

cron