Excel/SQL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Baker

    Excel/SQL

    Here's my situation.

    I need on-site manager's to be able to view a list of records on our website
    (which they already can do). They need to be able to select any/all fields
    and then export these items to an excel spreadsheet. The spreadsheet will
    have dynamically created columns/rows to append and life is good.

    What's the best way to go about this? I've used DTS to do this before, but
    it's been a long time and I can't remember if there's a way to handle this
    kind of stuff on a dynamic basis.

    I guess my real question is: Is there a way to do this via ASP or should I
    stick with a more SQL based approach?

    Thanks,
    James


  • Aaron [SQL Server MVP]

    #2
    Re: Excel/SQL

    If you can export to CSV and have them import CSV into Excel (rather than
    create an actual Office document), you can use methods described here:



    --

    (Reverse address to reply.)




    "James Baker" <cppjames@hotma il.com> wrote in message
    news:eykpwOlTEH A.3844@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Here's my situation.
    >
    > I need on-site manager's to be able to view a list of records on our[/color]
    website[color=blue]
    > (which they already can do). They need to be able to select any/all[/color]
    fields[color=blue]
    > and then export these items to an excel spreadsheet. The spreadsheet will
    > have dynamically created columns/rows to append and life is good.
    >
    > What's the best way to go about this? I've used DTS to do this before,[/color]
    but[color=blue]
    > it's been a long time and I can't remember if there's a way to handle this
    > kind of stuff on a dynamic basis.
    >
    > I guess my real question is: Is there a way to do this via ASP or should[/color]
    I[color=blue]
    > stick with a more SQL based approach?
    >
    > Thanks,
    > James
    >
    >[/color]


    Comment

    • James Baker

      #3
      Re: Excel/SQL

      Thanks for the link, searched there and didn't find that. I'll run that
      concept by my boss, but in the very likely event that they want this to be
      seemless, do I have any other options? Why people want everything in excel
      is beyond me =).

      Thanks!



      "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
      news:OJCKdRlTEH A.164@TK2MSFTNG P12.phx.gbl...[color=blue]
      > If you can export to CSV and have them import CSV into Excel (rather than
      > create an actual Office document), you can use methods described here:
      >
      > http://www.aspfaq.com/2482
      >
      > --
      > http://www.aspfaq.com/
      > (Reverse address to reply.)
      >
      >
      >
      >
      > "James Baker" <cppjames@hotma il.com> wrote in message
      > news:eykpwOlTEH A.3844@TK2MSFTN GP11.phx.gbl...[color=green]
      > > Here's my situation.
      > >
      > > I need on-site manager's to be able to view a list of records on our[/color]
      > website[color=green]
      > > (which they already can do). They need to be able to select any/all[/color]
      > fields[color=green]
      > > and then export these items to an excel spreadsheet. The spreadsheet[/color][/color]
      will[color=blue][color=green]
      > > have dynamically created columns/rows to append and life is good.
      > >
      > > What's the best way to go about this? I've used DTS to do this before,[/color]
      > but[color=green]
      > > it's been a long time and I can't remember if there's a way to handle[/color][/color]
      this[color=blue][color=green]
      > > kind of stuff on a dynamic basis.
      > >
      > > I guess my real question is: Is there a way to do this via ASP or[/color][/color]
      should[color=blue]
      > I[color=green]
      > > stick with a more SQL based approach?
      > >
      > > Thanks,
      > > James
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • James Baker

        #4
        Re: Excel/SQL

        I failed to mention we're using SQL 7...which might come into play as it
        seems that SQL 2000 had some DTS upgrades.

        James


        "James Baker" <cppjames@hotma il.com> wrote in message
        news:ePf9FklTEH A.3404@TK2MSFTN GP10.phx.gbl...[color=blue]
        > Thanks for the link, searched there and didn't find that. I'll run that
        > concept by my boss, but in the very likely event that they want this to be
        > seemless, do I have any other options? Why people want everything in[/color]
        excel[color=blue]
        > is beyond me =).
        >
        > Thanks!
        >
        >
        >
        > "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
        > news:OJCKdRlTEH A.164@TK2MSFTNG P12.phx.gbl...[color=green]
        > > If you can export to CSV and have them import CSV into Excel (rather[/color][/color]
        than[color=blue][color=green]
        > > create an actual Office document), you can use methods described here:
        > >
        > > http://www.aspfaq.com/2482
        > >
        > > --
        > > http://www.aspfaq.com/
        > > (Reverse address to reply.)
        > >
        > >
        > >
        > >
        > > "James Baker" <cppjames@hotma il.com> wrote in message
        > > news:eykpwOlTEH A.3844@TK2MSFTN GP11.phx.gbl...[color=darkred]
        > > > Here's my situation.
        > > >
        > > > I need on-site manager's to be able to view a list of records on our[/color]
        > > website[color=darkred]
        > > > (which they already can do). They need to be able to select any/all[/color]
        > > fields[color=darkred]
        > > > and then export these items to an excel spreadsheet. The spreadsheet[/color][/color]
        > will[color=green][color=darkred]
        > > > have dynamically created columns/rows to append and life is good.
        > > >
        > > > What's the best way to go about this? I've used DTS to do this[/color][/color][/color]
        before,[color=blue][color=green]
        > > but[color=darkred]
        > > > it's been a long time and I can't remember if there's a way to handle[/color][/color]
        > this[color=green][color=darkred]
        > > > kind of stuff on a dynamic basis.
        > > >
        > > > I guess my real question is: Is there a way to do this via ASP or[/color][/color]
        > should[color=green]
        > > I[color=darkred]
        > > > stick with a more SQL based approach?
        > > >
        > > > Thanks,
        > > > James
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Aaron [SQL Server MVP]

          #5
          Re: Excel/SQL

          > Thanks for the link, searched there and didn't find that. I'll run that[color=blue]
          > concept by my boss, but in the very likely event that they want this to be
          > seemless, do I have any other options?[/color]

          I don't understand what's not seamless. They download a CSV file, or they
          download an XLS file. If they double-click it, unless they have changed
          their settings, both should open in Excel. If they go to File... Open and
          open the file, both will open in Excel.

          A


          Comment

          • James Baker

            #6
            Re: Excel/SQL

            For some reason, when I do that...and I try to open it with Excel, I get the
            error "Microsft Excel can't load the required converter. This feature is
            not currently installed. Would you like to install it now?". Yet, if I
            click no...it still loads the file. I tried installing it, but it keeps
            asking for "Microsoft Office 2000 Premium". No idea why, I'm running Office
            XP.


            "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
            news:%23rZXbnlT EHA.1368@TK2MSF TNGP11.phx.gbl. ..[color=blue][color=green]
            > > Thanks for the link, searched there and didn't find that. I'll run that
            > > concept by my boss, but in the very likely event that they want this to[/color][/color]
            be[color=blue][color=green]
            > > seemless, do I have any other options?[/color]
            >
            > I don't understand what's not seamless. They download a CSV file, or they
            > download an XLS file. If they double-click it, unless they have changed
            > their settings, both should open in Excel. If they go to File... Open and
            > open the file, both will open in Excel.
            >
            > A
            >
            >[/color]


            Comment

            • Aaron [SQL Server MVP]

              #7
              Re: Excel/SQL

              Don't know, I don't have any problems loading CSV files directly.

              Might want to run through Office XP setup and make sure you didn't do a
              barebones install without any text converters...

              --

              (Reverse address to reply.)




              "James Baker" <cppjames@hotma il.com> wrote in message
              news:ukF8GvlTEH A.2908@TK2MSFTN GP10.phx.gbl...[color=blue]
              > For some reason, when I do that...and I try to open it with Excel, I get[/color]
              the[color=blue]
              > error "Microsft Excel can't load the required converter. This feature is
              > not currently installed. Would you like to install it now?". Yet, if I
              > click no...it still loads the file. I tried installing it, but it keeps
              > asking for "Microsoft Office 2000 Premium". No idea why, I'm running[/color]
              Office[color=blue]
              > XP.
              >
              >
              > "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
              > news:%23rZXbnlT EHA.1368@TK2MSF TNGP11.phx.gbl. ..[color=green][color=darkred]
              > > > Thanks for the link, searched there and didn't find that. I'll run[/color][/color][/color]
              that[color=blue][color=green][color=darkred]
              > > > concept by my boss, but in the very likely event that they want this[/color][/color][/color]
              to[color=blue]
              > be[color=green][color=darkred]
              > > > seemless, do I have any other options?[/color]
              > >
              > > I don't understand what's not seamless. They download a CSV file, or[/color][/color]
              they[color=blue][color=green]
              > > download an XLS file. If they double-click it, unless they have changed
              > > their settings, both should open in Excel. If they go to File... Open[/color][/color]
              and[color=blue][color=green]
              > > open the file, both will open in Excel.
              > >
              > > A
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • Tom Kaminski [MVP]

                #8
                Re: Excel/SQL

                "James Baker" <cppjames@hotma il.com> wrote in message
                news:eykpwOlTEH A.3844@TK2MSFTN GP11.phx.gbl...[color=blue]
                > Here's my situation.
                >
                > I need on-site manager's to be able to view a list of records on our[/color]
                website[color=blue]
                > (which they already can do). They need to be able to select any/all[/color]
                fields[color=blue]
                > and then export these items to an excel spreadsheet. The spreadsheet will
                > have dynamically created columns/rows to append and life is good.
                >
                > What's the best way to go about this? I've used DTS to do this before,[/color]
                but[color=blue]
                > it's been a long time and I can't remember if there's a way to handle this
                > kind of stuff on a dynamic basis.
                >
                > I guess my real question is: Is there a way to do this via ASP or should[/color]
                I[color=blue]
                > stick with a more SQL based approach?[/color]

                You could also try this ...
                Microsoft Support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft Copilot, Microsoft 365, Windows 11, Surface, and more.


                --
                Tom Kaminski IIS MVP


                http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS



                Comment

                • James Baker

                  #9
                  Re: Excel/SQL

                  That problem aside...I think the ultimate goal (which I'm going to clarify
                  shortly) is to be able to e-mail the *.xls files to clients. As arbitrary
                  as it might sound, I really don't think that some of these managers could
                  figure out to how to do a file > save as and change the drop down to a *.xls
                  file as opposed to the CSV extension. We'll see.


                  "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
                  news:uN38RzlTEH A.3988@tk2msftn gp13.phx.gbl...[color=blue]
                  > Don't know, I don't have any problems loading CSV files directly.
                  >
                  > Might want to run through Office XP setup and make sure you didn't do a
                  > barebones install without any text converters...
                  >
                  > --
                  > http://www.aspfaq.com/
                  > (Reverse address to reply.)
                  >
                  >
                  >
                  >
                  > "James Baker" <cppjames@hotma il.com> wrote in message
                  > news:ukF8GvlTEH A.2908@TK2MSFTN GP10.phx.gbl...[color=green]
                  > > For some reason, when I do that...and I try to open it with Excel, I get[/color]
                  > the[color=green]
                  > > error "Microsft Excel can't load the required converter. This feature[/color][/color]
                  is[color=blue][color=green]
                  > > not currently installed. Would you like to install it now?". Yet, if I
                  > > click no...it still loads the file. I tried installing it, but it keeps
                  > > asking for "Microsoft Office 2000 Premium". No idea why, I'm running[/color]
                  > Office[color=green]
                  > > XP.
                  > >
                  > >
                  > > "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
                  > > news:%23rZXbnlT EHA.1368@TK2MSF TNGP11.phx.gbl. ..[color=darkred]
                  > > > > Thanks for the link, searched there and didn't find that. I'll run[/color][/color]
                  > that[color=green][color=darkred]
                  > > > > concept by my boss, but in the very likely event that they want this[/color][/color]
                  > to[color=green]
                  > > be[color=darkred]
                  > > > > seemless, do I have any other options?
                  > > >
                  > > > I don't understand what's not seamless. They download a CSV file, or[/color][/color]
                  > they[color=green][color=darkred]
                  > > > download an XLS file. If they double-click it, unless they have[/color][/color][/color]
                  changed[color=blue][color=green][color=darkred]
                  > > > their settings, both should open in Excel. If they go to File... Open[/color][/color]
                  > and[color=green][color=darkred]
                  > > > open the file, both will open in Excel.
                  > > >
                  > > > A
                  > > >
                  > > >[/color]
                  > >
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  • Aaron [SQL Server MVP]

                    #10
                    Re: Excel/SQL

                    Same question... why do clients need XLS files? In fact, most of our
                    clients don't WANT xls files. Two main reasons: different versions of
                    Excel, and they also can use CSV much easier for importing into other
                    systems...

                    --

                    (Reverse address to reply.)




                    "James Baker" <cppjames@hotma il.com> wrote in message
                    news:OtSHbEmTEH A.332@TK2MSFTNG P11.phx.gbl...[color=blue]
                    > That problem aside...I think the ultimate goal (which I'm going to clarify
                    > shortly) is to be able to e-mail the *.xls files to clients. As arbitrary
                    > as it might sound, I really don't think that some of these managers could
                    > figure out to how to do a file > save as and change the drop down to a[/color]
                    *.xls[color=blue]
                    > file as opposed to the CSV extension. We'll see.
                    >
                    >
                    > "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
                    > news:uN38RzlTEH A.3988@tk2msftn gp13.phx.gbl...[color=green]
                    > > Don't know, I don't have any problems loading CSV files directly.
                    > >
                    > > Might want to run through Office XP setup and make sure you didn't do a
                    > > barebones install without any text converters...
                    > >
                    > > --
                    > > http://www.aspfaq.com/
                    > > (Reverse address to reply.)
                    > >
                    > >
                    > >
                    > >
                    > > "James Baker" <cppjames@hotma il.com> wrote in message
                    > > news:ukF8GvlTEH A.2908@TK2MSFTN GP10.phx.gbl...[color=darkred]
                    > > > For some reason, when I do that...and I try to open it with Excel, I[/color][/color][/color]
                    get[color=blue][color=green]
                    > > the[color=darkred]
                    > > > error "Microsft Excel can't load the required converter. This feature[/color][/color]
                    > is[color=green][color=darkred]
                    > > > not currently installed. Would you like to install it now?". Yet, if[/color][/color][/color]
                    I[color=blue][color=green][color=darkred]
                    > > > click no...it still loads the file. I tried installing it, but it[/color][/color][/color]
                    keeps[color=blue][color=green][color=darkred]
                    > > > asking for "Microsoft Office 2000 Premium". No idea why, I'm running[/color]
                    > > Office[color=darkred]
                    > > > XP.
                    > > >
                    > > >
                    > > > "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
                    > > > news:%23rZXbnlT EHA.1368@TK2MSF TNGP11.phx.gbl. ..
                    > > > > > Thanks for the link, searched there and didn't find that. I'll[/color][/color][/color]
                    run[color=blue][color=green]
                    > > that[color=darkred]
                    > > > > > concept by my boss, but in the very likely event that they want[/color][/color][/color]
                    this[color=blue][color=green]
                    > > to[color=darkred]
                    > > > be
                    > > > > > seemless, do I have any other options?
                    > > > >
                    > > > > I don't understand what's not seamless. They download a CSV file,[/color][/color][/color]
                    or[color=blue][color=green]
                    > > they[color=darkred]
                    > > > > download an XLS file. If they double-click it, unless they have[/color][/color]
                    > changed[color=green][color=darkred]
                    > > > > their settings, both should open in Excel. If they go to File...[/color][/color][/color]
                    Open[color=blue][color=green]
                    > > and[color=darkred]
                    > > > > open the file, both will open in Excel.
                    > > > >
                    > > > > A
                    > > > >
                    > > > >
                    > > >
                    > > >[/color]
                    > >
                    > >[/color]
                    >
                    >[/color]


                    Comment

                    • James Baker

                      #11
                      Re: Excel/SQL

                      Very nice...looks good so far. Thanks much, barring anything unforseen,
                      this should be the ticket.

                      Thanks!
                      James


                      "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
                      news:ca7ras$981 3@kcweb01.netne ws.att.com...[color=blue]
                      > "James Baker" <cppjames@hotma il.com> wrote in message
                      > news:eykpwOlTEH A.3844@TK2MSFTN GP11.phx.gbl...[color=green]
                      > > Here's my situation.
                      > >
                      > > I need on-site manager's to be able to view a list of records on our[/color]
                      > website[color=green]
                      > > (which they already can do). They need to be able to select any/all[/color]
                      > fields[color=green]
                      > > and then export these items to an excel spreadsheet. The spreadsheet[/color][/color]
                      will[color=blue][color=green]
                      > > have dynamically created columns/rows to append and life is good.
                      > >
                      > > What's the best way to go about this? I've used DTS to do this before,[/color]
                      > but[color=green]
                      > > it's been a long time and I can't remember if there's a way to handle[/color][/color]
                      this[color=blue][color=green]
                      > > kind of stuff on a dynamic basis.
                      > >
                      > > I guess my real question is: Is there a way to do this via ASP or[/color][/color]
                      should[color=blue]
                      > I[color=green]
                      > > stick with a more SQL based approach?[/color]
                      >
                      > You could also try this ...
                      > http://support.microsoft.com/?kbid=301044
                      >
                      > --
                      > Tom Kaminski IIS MVP
                      > http://www.microsoft.com/windowsserv...y/centers/iis/
                      > http://mvp.support.microsoft.com/
                      > http://www.iistoolshed.com/ - tools, scripts, and utilities for running[/color]
                      IIS[color=blue]
                      > http://www.tryiis.com
                      >
                      >[/color]


                      Comment

                      • Tom Kaminski [MVP]

                        #12
                        Re: Excel/SQL

                        .... and you can use this technique to give the file an "xls" file name:


                        "James Baker" <cppjames@hotma il.com> wrote in message
                        news:Oq6FAHmTEH A.1412@TK2MSFTN GP11.phx.gbl...[color=blue]
                        > Very nice...looks good so far. Thanks much, barring anything unforseen,
                        > this should be the ticket.
                        >
                        > Thanks!
                        > James
                        >
                        >
                        > "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
                        > news:ca7ras$981 3@kcweb01.netne ws.att.com...[color=green]
                        > > "James Baker" <cppjames@hotma il.com> wrote in message
                        > > news:eykpwOlTEH A.3844@TK2MSFTN GP11.phx.gbl...[color=darkred]
                        > > > Here's my situation.
                        > > >
                        > > > I need on-site manager's to be able to view a list of records on our[/color]
                        > > website[color=darkred]
                        > > > (which they already can do). They need to be able to select any/all[/color]
                        > > fields[color=darkred]
                        > > > and then export these items to an excel spreadsheet. The spreadsheet[/color][/color]
                        > will[color=green][color=darkred]
                        > > > have dynamically created columns/rows to append and life is good.
                        > > >
                        > > > What's the best way to go about this? I've used DTS to do this[/color][/color][/color]
                        before,[color=blue][color=green]
                        > > but[color=darkred]
                        > > > it's been a long time and I can't remember if there's a way to handle[/color][/color]
                        > this[color=green][color=darkred]
                        > > > kind of stuff on a dynamic basis.
                        > > >
                        > > > I guess my real question is: Is there a way to do this via ASP or[/color][/color]
                        > should[color=green]
                        > > I[color=darkred]
                        > > > stick with a more SQL based approach?[/color]
                        > >
                        > > You could also try this ...
                        > > http://support.microsoft.com/?kbid=301044
                        > >
                        > > --
                        > > Tom Kaminski IIS MVP
                        > > http://www.microsoft.com/windowsserv...y/centers/iis/
                        > > http://mvp.support.microsoft.com/
                        > > http://www.iistoolshed.com/ - tools, scripts, and utilities for running[/color]
                        > IIS[color=green]
                        > > http://www.tryiis.com
                        > >
                        > >[/color]
                        >
                        >[/color]


                        Comment

                        Working...