Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to custom funcation in Excel2003 with C#

How to custom funcation in Excel2003 with C#

Scheduled Pinned Locked Moved C#
csharpdatabasesql-serverdesignsysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dreamwinter
    wrote on last edited by
    #1

    :(Recently I want to design a report forms that base on excel2003.But the primary function in Excel 2003 can not satisfies the business needs.So I have many funcations to get data from SQL Server in c# .I want to transform these function into Excel 2003 custom function. Can you tell me how to do it? Thanks!

    D 1 Reply Last reply
    0
    • D dreamwinter

      :(Recently I want to design a report forms that base on excel2003.But the primary function in Excel 2003 can not satisfies the business needs.So I have many funcations to get data from SQL Server in c# .I want to transform these function into Excel 2003 custom function. Can you tell me how to do it? Thanks!

      D Offline
      D Offline
      David Stone
      wrote on last edited by
      #2

      You would have to go one of three routes. 1) Write Excel macros in VBA, using ADO to get the data out of the database and then populate the spreadsheet with the values you get back. 2) Use Visual Studio Tools for Office to write your "macro" code in C# and use ADO.NET to get your data out of the DB. This assumes that you can afford VSTO or that you have an MSDN subscription. 3) Use the Office Primary Interop Assemblies to make calls out to Excel. This is a lot more cumbersome than using VSTO, but it's free (assuming you have Office installed).


      Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..." -Jörgen Sigvardsson

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups