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 8420367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:52:24+00:00 2026-06-10T02:52:24+00:00

I am dynamically creating a Excel File that is displayed to the users upon

  • 0

I am dynamically creating a Excel File that is displayed to the users upon creation, however I now need to also save the file onto the server.

How would I save it to a specific folder?

I have the following code

public void ExportMembers()
    {

        Microsoft.Office.Interop.Excel.Application xla = new Microsoft.Office.Interop.Excel.Application();

        Workbook wb = xla.Workbooks.Add(XlSheetType.xlWorksheet);

        Worksheet ws = (Worksheet)xla.ActiveSheet;

        ws.Cells[1, 1] = "Site Id";

       //I create the rest of the cells here

        xla.Visible = true; //this displays the excel spreadsheet to the user

        //client id code is here

                if (!System.IO.Directory.Exists("/Files/" + clientId + "/Excel"))
        { //if doesn't exist make folder

            System.IO.Directory.CreateDirectory("/Files/" + clientId);

            System.IO.Directory.CreateDirectory("/Files/" + clientId + "/Excel");

        }

 //save the xla as a file Here

    }

How do I save the spreadsheet on the server?

Any help is appreciated.

Thanks

  • 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-06-10T02:52:25+00:00Added an answer on June 10, 2026 at 2:52 am

    see the Save method for Microsoft.Office.Interop.Excel.Application

    http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._application.save

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

Sidebar

Related Questions

I am creating an Excel file dynamically(data coming from database). on calling the URL
I recently found that dynamically creating object and methods in Ruby is quite a
I'm currently designing an app that calls for dynamically creating objects and then displaying
I just found out that in FF, if you are dynamically creating an OPTION
I've a requirement that I need to read an excel sheet programmatically using asp.net/C#
I am dynamically creating divs within a jquery accordion that are loaded with data
I am dynamically creating classes which contain spring beans, however the beans are not
I am dynamically creating a table that contains a textbox in each cell. The
I am dynamically creating a canvas, and I need a background image within the
Using DTS I'm dynamically creating an access database. After the file is created (which

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.