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. Export to Excel

Export to Excel

Scheduled Pinned Locked Moved ASP.NET
help
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.
  • A Offline
    A Offline
    Assaf82
    wrote on last edited by
    #1

    Hello I try to export some data fom my textboxes and comboboxes to a define excel sheet I use this methode but i have an error message when exporting "Dim path As String = CurDir() + "\WebUI\Editors\QuotationReport.xls" Dim ex As Excel.Application Dim wb As Excel.Workbook ' Dim ws As Excel.Worksheet ex = CreateObject("Excel.Application") ex.Visible = False wb = ex.Workbooks.Open(path) Dim objSheet As Excel.Worksheet objSheet = wb.Sheets(1) Dim Somme As Double = 0 "Here i assign the dat to a specific cells" ex = Nothing ex.Workbooks.Close() Response.Clear() Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name) Response.AddHeader("Content-Length", file.Length.ToString()) Response.ContentType = "application/vnd.ms(-Excel)" Response.WriteFile(file.FullName) please can someone help me. And thanks in advance Assaf

    R 1 Reply Last reply
    0
    • A Assaf82

      Hello I try to export some data fom my textboxes and comboboxes to a define excel sheet I use this methode but i have an error message when exporting "Dim path As String = CurDir() + "\WebUI\Editors\QuotationReport.xls" Dim ex As Excel.Application Dim wb As Excel.Workbook ' Dim ws As Excel.Worksheet ex = CreateObject("Excel.Application") ex.Visible = False wb = ex.Workbooks.Open(path) Dim objSheet As Excel.Worksheet objSheet = wb.Sheets(1) Dim Somme As Double = 0 "Here i assign the dat to a specific cells" ex = Nothing ex.Workbooks.Close() Response.Clear() Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name) Response.AddHeader("Content-Length", file.Length.ToString()) Response.ContentType = "application/vnd.ms(-Excel)" Response.WriteFile(file.FullName) please can someone help me. And thanks in advance Assaf

      R Offline
      R Offline
      rp_suman
      wrote on last edited by
      #2

      Hi, If you are exporting grid control data, this could be helpful: Export to Excel Custom control [^]

      -- "Programming is an art that fights back!"

      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