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

  • Home
  • SEARCH
  • 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 8177511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:31:43+00:00 2026-06-06T23:31:43+00:00

I Have written 2 methods in C# . one for getting records from excel

  • 0

I Have written 2 methods in C# . one for getting records from excel sheet and one for inserting into excel sheet. both methods works fine when im running in my local system. but when i hosted it to appHarbor.com, getting records succeded but inserting failed.

here is the insert method

private bool AddBlessingToExcel(Blessing blessing)
{
    try
    {

        string path = System.Web.HttpContext.Current.Server.MapPath("Data") + "/WeddingSheets.xls";

        OleDbConnection myConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=Excel 8.0");

        // always read from the sheet1.

        OleDbCommand myCommand = new OleDbCommand("Insert into [Blessings$] (GuestName, GuestLocation, GuestMessage)" + " values ('" + blessing.GuestName + "', '" + blessing.GuestLocation + "', '" + blessing.GuestMessage + "')");

        myConnection.Open();

        myCommand.Connection = myConnection;


        int val = myCommand.ExecuteNonQuery();

        //Close the connection.
        myConnection.Close();
        return true;
    }
    catch(Exception ex)
    {
        //throw ex;
        return false;
    }
}

i dont know what the problem is exactly but my guess is its because of file permissions..can anyone please provide me a solution as soon as possible.

  • 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-06T23:31:44+00:00Added an answer on June 6, 2026 at 11:31 pm

    Inside the “Settings” page of the application, at the top of the page you should see an option named “Enable file system write access”, with a checkbox next to it.

    That should give your app write access. However, I believe this gets reset every time you build, so you might have to enable it again after a new deployment.

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

Sidebar

Related Questions

I have a method somewhat similar to the one written bellow(this is just a
I have written a python script with methods in it. Now I want to
I have written an O/R database wrapper that generates some wrapper methods for stored
I have a written a method to get all the records and return in
I am using spring annotations I have written one method public ModelAndView showTestPage(@RequestParam(firstInstanceId) String
I have written a VB.Net program however there is a bug in one of
I've got another simple one (I think) that's stumping me. I have written a
I have written a program which will serialize and de-serialize, it does this fine
I have one query. It is executing fine on Hive CLI and returning the
I have created one filter which is working fine for all requests which my

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.