Dataset into Excel

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Helen Trim

    #1

    Dataset into Excel


    I have data in a dataset that the user wants in Excel. I can do it by
    writing the data in one cell at a time but it's a bit slow. Is there a quick
    way to do it?

    TIA
    --
    Helen
  • Lars Netzel

    #2
    Re: Dataset into Excel

    Maybe you can convert the datagrid data to an array instead and then write
    to the excel sheet using a range (C7:C81).

    At least when reading from a range you get an array back so I asume it would
    work the other way around, but I have noidea if this is slower or faster.

    best regards/
    Lars Netzel


    "Helen Trim" <HelenTrim@disc ussions.microso ft.com> wrote in message
    news:C102867E-D150-4BF2-B75C-E1EB3FFECE6D@mi crosoft.com...[color=blue]
    >
    > I have data in a dataset that the user wants in Excel. I can do it by
    > writing the data in one cell at a time but it's a bit slow. Is there a
    > quick
    > way to do it?
    >
    > TIA
    > --
    > Helen[/color]


    Comment

    • Cor Ligthert [MVP]

      #3
      Re: Dataset into Excel

      Helen,

      I hope that this link give you some ideas



      There are a lot of generics on Internet for this by the way based on the
      ways described in this article.

      I hope this helps,

      Cor


      Comment

      • Ken Tucker [MVP]

        #4
        Re: Dataset into Excel

        Hi,

        Here is a method to save the dataset as an xml spreadsheet and
        transform it into an xls. The title shows it is for asp.net but you can use
        the methods with a windows forms application.



        Ken
        -------------------
        "Helen Trim" <HelenTrim@disc ussions.microso ft.com> wrote in message
        news:C102867E-D150-4BF2-B75C-E1EB3FFECE6D@mi crosoft.com...[color=blue]
        >
        > I have data in a dataset that the user wants in Excel. I can do it by
        > writing the data in one cell at a time but it's a bit slow. Is there a
        > quick
        > way to do it?
        >
        > TIA
        > --
        > Helen[/color]


        Comment

        • Richard Dudley

          #5
          Re: Dataset into Excel

          I've tried a number of ways, and hands down the best way I've found is the
          library from Carlos Aguilar at
          http://www.carlosag.net/Tools/ExcelX...r/Default.aspx.

          "Helen Trim" <HelenTrim@disc ussions.microso ft.com> wrote in message
          news:C102867E-D150-4BF2-B75C-E1EB3FFECE6D@mi crosoft.com...[color=blue]
          >
          > I have data in a dataset that the user wants in Excel. I can do it by
          > writing the data in one cell at a time but it's a bit slow. Is there a[/color]
          quick[color=blue]
          > way to do it?
          >
          > TIA
          > --
          > Helen[/color]


          Comment

          Working...