CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010

    Question How to read / write Excel file using C#?

    I want to read values from excel file and the results should be printed in that same excel file.
    I am using VS 2005 and MS Office 2003.

    Thanks in Advance!

  2. #2
    Join Date
    Apr 2004
    England, Europe

    Re: How to read / write Excel file using C#?

    Is this article any help? http://support.microsoft.com/kb/302084
    My hobby projects:

  3. #3
    Join Date
    Feb 2013

    Re: How to read / write Excel file using C#?

    You can use a 3rd party libraries to work with Excel files in C#. For example you may look for this .Net component.

  4. #4
    Join Date
    Jul 2011

    Re: How to read / write Excel file using C#?

    Workbook book = new Workbook();
    book.Worksheets[0].Range["A7"].Value = "abc";

    I use an Excel library this project introduces: http://spreadsheet.codeplex.com/

  5. #5
    Join Date
    Feb 2011
    United States

    Re: How to read / write Excel file using C#?

    My strategy has been to always avoid excel files like the plague and write CSV (or TSV) files (link) to work with programatically. Alas, that is not always an option. But if, in your case, it is: consider it!
    Best Regards,

    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  6. #6

    Re: How to read / write Excel file using C#?

    There are Excel libs that can be imported to the program - these are standard stuff that are available in the internet and need not be posted in forums unless theres something to discuss CG does not create any languages or software - the MSDN is for that. CG allows one to brainstorm a problem after you've tried.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.