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. Visual Basic
  4. make file excel(*.xls) from vb .NET 2003

make file excel(*.xls) from vb .NET 2003

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorial
5 Posts 5 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.
  • A Offline
    A Offline
    aphei
    wrote on last edited by
    #1

    i have a problem for making excel file. please tell me how to make it, thanks.

    N K 2 Replies Last reply
    0
    • A aphei

      i have a problem for making excel file. please tell me how to make it, thanks.

      N Offline
      N Offline
      nguyenvhn
      wrote on last edited by
      #2

      There are many ways. _Using OLE Automation _Using thirst party component: Aspose, FarPoint... _Make it yourself

      T 1 Reply Last reply
      0
      • N nguyenvhn

        There are many ways. _Using OLE Automation _Using thirst party component: Aspose, FarPoint... _Make it yourself

        T Offline
        T Offline
        Tamimi Code
        wrote on last edited by
        #3

        not helpful at all

        When you get mad...THINK twice that the only advice Tamimi - Code

        D 1 Reply Last reply
        0
        • A aphei

          i have a problem for making excel file. please tell me how to make it, thanks.

          K Offline
          K Offline
          Kevin Nicol
          wrote on last edited by
          #4

          Here is a simple app that takes a dataset and writes a worksheet per data table in the set Public Sub writeToExcel(ByVal source As DataSet) Dim doc As New System.IO.StreamWriter("Excel.xls") 'use .xls even though its an xml file Dim startExcelXML As String = "" startExcelXML &= "" startExcelXML &= vbNewLine & "" 'write the styles tags that format the data and cells properly startExcelXML &= vbNewLine & "" startExcelXML &= vbNewLine & " " startExcelXML &= vbNewLine & " <Alignment ss:Vertical=""Bottom""/>" startExcelXML &= vbNewLine & " <Borders/>" startExcelXML &= vbNewLine & " <Font/>" startExcelXML &= vbNewLine & " <Interior/>" startExcelXML &= vbNewLine & " <NumberFormat/>" startExcelXML &= vbNewLine & " <Protection/>" startExcelXML &= vbNewLine & " " startExcelXML &= vbNewLine & "" startExcelXML &= vbNewLine & "<Alignment ss:Horizontal=""Center"" ss:Vertical=""Bottom""/>" startExcelXML &= vbNewLine & "<Font x:Family=""Swiss"" ss:Size=""8"" ss:Bold=""1""/>" startExcelXML &= vbNewLine & "<Interior ss:Color=""#C0C0C0"" ss:Pattern=""Solid""/>" startExcelXML &= vbNewLine & "" startExcelXML &= vbNewLine & " " startExcelXML &= vbNewLine & " <Font " + "x:Family=""Swiss"" ss:Bold""0""/>" startExcelXML &= vbNewLine & " " startExcelXML &= vbNewLine & "" 'write the header to the file doc.WriteLine(startExcelXML) 'write one sheet per table For Each tab As DataTable In source.Tables Dim sheetname As String = "" doc.WriteLine(sheetname) doc.WriteLine("") 'write t

          1 Reply Last reply
          0
          • T Tamimi Code

            not helpful at all

            When you get mad...THINK twice that the only advice Tamimi - Code

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Neither was the question...

            Dave Kreskowiak Microsoft MVP - Visual Basic

            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