Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Aug 2006
    Location
    Capital Federal, Argentina
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create an XLS from a List (2k)

    Hi all,

    Is it possible to make an Excel file using the RowSource of a list?

    Thanx,

    Mat&

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Create an XLS from a List (2k)

    Do you mean a list box?

    If the row source of the list box is a table or query, you can export that table or query to Excel using File | Export...
    If the row source is an SQL string (SELECT ... FROM ...), you can create a query with that SQL string, and export that.
    If the row source is a list of values, you can copy that list to the clipboard, then paste it into an Excel worksheet, and use Data | Text to Columns to move the values into individual cells.

    But I have this nagging feeling that you meant something else...

  3. #3
    New Lounger
    Join Date
    Aug 2006
    Location
    Capital Federal, Argentina
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create an XLS from a List (2k)

    Hi Hans,
    Thanks for the prompt reply.

    Yes, you're right. The thing is that the row source of my list box is an SQL string. More precisely a stored procedure
    (i.e. EXEC SP '01', 'a').

    How can I export the result of that SP to a XLS file by pressing a button of the form?

    Thanx again,

    Mat&

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Create an XLS from a List (2k)

    Sorry, I don't know anything about that. I hope someone else can help you.

  5. #5
    New Lounger
    Join Date
    Aug 2006
    Location
    Capital Federal, Argentina
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create an XLS from a List (2k)

    Ok. Thanks anyway.

    Mat&

    PS: But can I make a XLS file using a SQL query?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Create an XLS from a List (2k)

    As I noted, you can export a stored query (whether it is based on local tables or on linked SQL server tables) to Excel.

    If you have an SQL string, you can create a query from it and export that.

  7. #7
    New Lounger
    Join Date
    Aug 2006
    Location
    Capital Federal, Argentina
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create an XLS from a List (2k)

    OK. I'll try and then tell you what happened.

    Thanks very much!

    Mat&

Posting Permissions

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