Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7055277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:43:45+00:00 2026-05-28T03:43:45+00:00

I have a project where I create sample documents. Code here : private void

  • 0

I have a project where I create sample documents. Code here :

 private void btnExcel_Click(object sender, System.Windows.RoutedEventArgs e)
    {
        if (AutomationFactory.IsAvailable)
        {
            dynamic excel = AutomationFactory.CreateObject("Excel.Application");
            excel.Visible = true;

            dynamic workbook = excel.workbooks;
            workbook.Add();

            dynamic sheet = excel.ActiveSheet;
            dynamic cell = null;
            int i;
            int z = 20;

            for (i = 1; i <= 20; i++)
            {
                cell = sheet.Cells[i, 1];
                cell.Value = i.ToString();

                cell = sheet.Cells[i, 2];
                cell.Value = z.ToString();

                z--;
            }

        }

    }

As you can see, this is for Excel documents. Is there any way I can something like this and export in to PDF files? Thanks for the insights.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:43:45+00:00Added an answer on May 28, 2026 at 3:43 am

    Yes you can.

    You can call a WCF service operation passing it all the data that it needs. Then do all what is required to generate the PDF file. After you’ve done that, you have two options:

    • You can send back the bytes as the result of the operation. In this case, you can show the user a SaveDialog to save the file to his local disk.
    • You can send the generated file to another aspx page and display the PDF file to the user who then has the choice to save it to his local disk or simply view it.

    I hope that was what you’re looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project where I create WiX (Windows Installer for XML) files, when
I have a RoR project on my Windows 7 PC. I want to create
I have a project to create a program, which prevents the user from escaping
So for my programming class we have had a project to create a virtual
If you create an ASP.NET web file project you have direct access to the
We have a netbeans project that has an xsd that we use to create
I have a maven project and I'd like to create a distribution of it
I am working on a project and have the following psuedocode: // create a
I have the following code. <s:push value=#session['person']> <s:if test=%{admin=='y'}> <a class=add href=/projit1/project/addProject.jsp>Create a Project</a>
I want to create some sample code for JPA2 that can be run inside

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.