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. Web Development
  3. ASP.NET
  4. excel document

excel document

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorial
3 Posts 3 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.
  • N Offline
    N Offline
    niki_nilu
    wrote on last edited by
    #1

    how to create an excel document on the button click in asp.net2.0 Gayatri

    S P 2 Replies Last reply
    0
    • N niki_nilu

      how to create an excel document on the button click in asp.net2.0 Gayatri

      S Offline
      S Offline
      ShruthiLavan
      wrote on last edited by
      #2

      In visual studio 2005, Add the reference - Microsoft office 10.0 object Library to your project. Add the following code in button click event Dim excel As New Excel.Application Dim wbook As Excel.Workbook Dim wSheet As Excel.Worksheet wbook = excel.Workbooks.Add() wSheet = wbook.ActiveSheet() Dim strFileName As String = "The location to save the excel file" wbook.SaveAs(strFileName) excel.Workbooks.Open(strFileName) excel.Visible = True Try it and check whether its working. with regards, lavanya

      1 Reply Last reply
      0
      • N niki_nilu

        how to create an excel document on the button click in asp.net2.0 Gayatri

        P Offline
        P Offline
        Paddy Boyd
        wrote on last edited by
        #3

        Or you can output your data to an HTML table in the page and then add headers to get explorer to open that item in Excel.

        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