DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Export datagrid to .csv or .xls

  1. #1
    PhlipL Guest

    Export datagrid to .csv or .xls


    How do I export the datagrid info to an excel or comma delimited file?
    Any help is appreciated..

  2. #2
    dnagel Guest

    Re: Export datagrid to .csv or .xls

    Its important to keep in mind the [end-user] of the file
    and what their needs are... many times the formatting
    of the numbers and the text blocks can cause issues with
    how a specific client interprets that data...

    Most problems come from having Double Quotes forced into
    the format so that strings can be delimited as per the Access
    and Excel (standard) settings...

    A good start is to find the posts here that deal with the
    FileSystemObject and you'll notice how very quickly the FSO
    object (and method) model becomes second nature...

    Its as easy as opening(creating) a file, making a loop
    for the extent of your data and then either reading lines
    in and using split to fill an array with your data, or write the
    correctly formatted CSV line to the file as a whole line of text
    at a time.

    Keep in mind the rules of the client readers of the file and you
    should be able to make light work of it...


    "PhlipL" <aplatfl@aol.com> wrote in message news:3b267a67$1@news.devx.com...
    >
    > How do I export the datagrid info to an excel or comma delimited file?
    > Any help is appreciated..




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center