Results 1 to 5 of 5

Thread: export the content of a DataGrid

  1. #1

    Thread Starter
    Lively Member Alessio's Avatar
    Join Date
    Feb 2002
    Location
    http://www.nottehorror.too.it
    Posts
    101

    export the content of a DataGrid

    how I can directly to export the content of a DataGrid from the VB project in an Excel file ?
    ......:::::http://nottehorror.too.it/:::::......

  2. #2
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697
    Here is some code from eimroda....

    Code:
    Open "TestFile.xls" For output As #1
    For i=0 to Grid.Rows-1
          print #1, Grid.TextMatrix(i, 0) & vbTab & Grid.TextMatrix(i,1) 'and so on
    Next i
    Close #1

  3. #3

    Thread Starter
    Lively Member Alessio's Avatar
    Join Date
    Feb 2002
    Location
    http://www.nottehorror.too.it
    Posts
    101
    ther is an error. It does not recognize the property of the object Grid.TextMatrix (TextMatrix it is not in the list of property)...)
    ......:::::http://nottehorror.too.it/:::::......

  4. #4
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697
    Grid is the name of your DataGrid....

  5. #5

    Thread Starter
    Lively Member Alessio's Avatar
    Join Date
    Feb 2002
    Location
    http://www.nottehorror.too.it
    Posts
    101
    yes
    ......:::::http://nottehorror.too.it/:::::......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width