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

    Need help for writing a code in C# in order to Read from Excel sheet

    Hi,

    I have an excel sheet which have multiple tabs in it. Excel sheet contains SQL queries. I need to write a code in C# so that it opens the excel sheet, search for a select Statement and execute the query in sql developer.
    I was able to open SQL developer using the following command
    System.Digonestics.process.start ("sqldeveloper.exe").

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Need help for writing a code in C# in order to Read from Excel sheet

    Not sure what sqldeveloper is. Is it a 3rd party app? Or are you referring to the developer edition of MS Sql? At any rate, you can open an excel file and read the cell data to extract the sql easy enough. If using MS sql dev edition, just use SqlConnection and SqlCommand to execute the sql statement. If SqlDeveloper.exe is a 3rd party app, then how you do it will depend on their interface.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured