none
Writing to An Excel Spreadsheet From VB RRS feed

  • Question

  • I wrote VB app, using Visual Studio 2008 that writes data to a flat file.  I would like to now write the data, which consists of several individual fields, to an Excel spreadsheet.  How can I do that and what object(s) to I need to import in order to access the appropriate methods?   

    Monday, May 5, 2008 12:48 AM

Answers

  • You have to register the interop COM object to do this.  An example can be found here:

     

    http://www.dynamicajax.com/fr/Creating_Excel_From_VB_DOT_NET-.html

     

     

    Monday, May 5, 2008 1:04 AM
  • Hi,

     

    You can mark Jonathan's post as an answer. People 'usually' do not reply to Marked answers as marking an answer means the issue has been resolved.

     

    Post Moved from Getting started with SQL Server to Visual Basic General

     

    HTH,
    Suprotim Agarwal

     

     

    Monday, May 5, 2008 1:59 AM
    Moderator
  • Anytime that you have received the answer to a question that you have asked, you can let everyone know this, but clicking the Mark As Answer button on the post that answers your question.  Sometimes more than one answer is provided, and if there are more than one right answer, and you happen to try it out, you can click Mark Answer for each post that actually answers your question.  The Moderators and Answerers on the forums have the ability to do this for any post, and if we happen onto a post that has a definite answer, we can mark it as Answered as well. 

     

    Just a small note on this particular post, it isn't a SQL Server related question, and will likely be moved by a Moderator to one of the Visual Basic forums which are:

     

    http://forums.microsoft.com/Forums/default.aspx?ForumGroupID=10&SiteID=1

    Monday, May 5, 2008 2:00 AM

All replies

  • You have to register the interop COM object to do this.  An example can be found here:

     

    http://www.dynamicajax.com/fr/Creating_Excel_From_VB_DOT_NET-.html

     

     

    Monday, May 5, 2008 1:04 AM
  • Thanks!  This looks like just what I need.  By the way, how do you stop a thread on this forum so others don't waste their time replying to my thread, since you have already supplied me with an answer?

    Monday, May 5, 2008 1:54 AM
  • Hi,

     

    You can mark Jonathan's post as an answer. People 'usually' do not reply to Marked answers as marking an answer means the issue has been resolved.

     

    Post Moved from Getting started with SQL Server to Visual Basic General

     

    HTH,
    Suprotim Agarwal

     

     

    Monday, May 5, 2008 1:59 AM
    Moderator
  • Anytime that you have received the answer to a question that you have asked, you can let everyone know this, but clicking the Mark As Answer button on the post that answers your question.  Sometimes more than one answer is provided, and if there are more than one right answer, and you happen to try it out, you can click Mark Answer for each post that actually answers your question.  The Moderators and Answerers on the forums have the ability to do this for any post, and if we happen onto a post that has a definite answer, we can mark it as Answered as well. 

     

    Just a small note on this particular post, it isn't a SQL Server related question, and will likely be moved by a Moderator to one of the Visual Basic forums which are:

     

    http://forums.microsoft.com/Forums/default.aspx?ForumGroupID=10&SiteID=1

    Monday, May 5, 2008 2:00 AM