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. ASP.NET AAND WRITE EXCEL

ASP.NET AAND WRITE EXCEL

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelp
2 Posts 2 Posters 1 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.
  • S Offline
    S Offline
    S A R I T H
    wrote on last edited by
    #1

    How can we write an excel file by using asp.net it have 7 columns.. Help me please

    Sarith...

    S 1 Reply Last reply
    0
    • S S A R I T H

      How can we write an excel file by using asp.net it have 7 columns.. Help me please

      Sarith...

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

      use StreamWriter and just save your file a excel file dim dtData as new DataTable dtData.Columns.Add("Column1") dtData.Columns.Add("Column2") dtData.Columns.Add("Column3") dtData.Columns.Add("Column4") dtData.Columns.Add("Column5") dtData.Columns.Add("Column6") dtData.Columns.Add("Column7") Dim fInfo As FileInfo fInfo = New FileInfo("C:\test.xls") Dim sw as System.IO.StreamWriter("C:\test.xls") Dim sepator as string = "\t" Dim intColumnCount as integer = dtData.Columns.Count for i as integer = 0 to intColumnCount -1 sw.write(dtData.Columns(i).ColumnName) if i < intCount-1 then sw.write(sepator) end if next sw.Close() i hope this helps Motivation alone is not enough, if you have an idiot and you motivate him/her, you now have a motivated idiot

      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