CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: SaveAs For C#

  1. #1
    Join Date
    May 2011

    C# to Create Excel Workbook

    In C# how would I add an Excel Workbook, and explicitly name the worksheet that is added to the workbook?
    Last edited by jo15765; December 21st, 2012 at 07:07 AM.

  2. #2
    Join Date
    May 2011

    Re: SaveAs For C#

    Well I answered my own question after HOURS of googling --- thanks to all who viewed my beginner question

    Here is the solution I used...
    Excel.Application myApp;
    Excel.Workbook myWorkBk;
    object missingValue = System.Reflection.Missing.Value;
    myApp = new Excel.Application;
    myApp.Visible = true;
    myWorkBk = myApp.WOrkbooks.Add(missingValue);

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.