Results 1 to 4 of 4

Thread: [RESOLVED] export table to 2 dimensional array

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Location
    oxford, UK
    Posts
    149

    Resolved [RESOLVED] export table to 2 dimensional array

    Hi there
    I originally posted this to Daztabase development - got no response - not really sure where it belongs.

    I hope I am not being real dull - I have a database table with 3 fields: Item, RunDayOfWeek, Value[boolean] and need to produce a weekly report, ideally exported to an excel spreadsheet.

    I have 10 items and a record for each for every day of the Week (e.g. Mon, Tues etc), so at the end of week the table contains 70 records indicating the value foreach item on each day.

    I want to export these, ideally to an excel spreadsheet, such that I end up with a 2 dimensional table/array i.e:

    Code:
    Days
    Item        Mon    Tues    Wed    Thur   etc
    1       True    False   True
    2       false    true
    3       true     false
    So I need to logically run through the recordset returned from a SELECT * statement and place the value (TRUE or FALSE) from the 3rd field in the correct array index (excel cell).

    How best to do this?

    Thanks
    Kester

  2. #2
    Hyperactive Member ARPRINCE's Avatar
    Join Date
    Mar 2003
    Location
    Pinoy in NJ
    Posts
    381

    Re: export table to 2 dimensional array

    You could do something like this (see attachment using SQL SERVER as db).
    Attached Images Attached Images  

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Location
    oxford, UK
    Posts
    149

    Re: export table to 2 dimensional array

    Many thanks for your quick response. I will take a look at your suggestion.
    Kester

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Location
    oxford, UK
    Posts
    149

    Re: export table to 2 dimensional array

    That is smart - I will modify the app to use this in due course.

    Again, many thanks
    Kester

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