Populate Combobox in Excel from SQL Table

I have a requirement to populate a combobox in excel from a table in SQL when the user opens the excel workbook. Can you help me on how I can do that. I have a supplier column in the table which I like to appear in the combobox and has around 1500 records.
Excel Version 2010
SQL Server Version 2008
Thanks in advance.

Hi Jaggy99,
According to your description, you want to implement a combobox for the supplier column when open a SQL Server table in Microsoft Excel, right?
I have tested it on my local environment, when we connect to a SQL Server database and display the table data in Excel, the excel will populate a drop-down list for each columns as the filter. Here is the screenshot for you reference.
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • Populate combobox grid view from sql server

    hello,
    is it possible to populate combo box from entries in sql server database
    also is it possible to populate grid view from entries in database including image files stored in binary format
    regards,

    Yes and yes.

  • Pull data from SQL Table and display it in mail

    I have a requirement to pull the data from SQL table and send it in email.  Currently I am sending the hard coded info in email but is it possible to pull some data from SQL Table and than format it and send it across in the same email? 
    Can you guide me with steps on this.
    Neil

    There are several ways to do this.  First is to populate a file in a data flow and then send that as an attachment in the send mail task. 
    As far as including the results in the email body this becomes a bit trickier.  To use a variable you would need to use an SSIS variable type of
    Object, this is similar to a collection in .NET.  The problem once the object is populated is that it isn't like a readable result set, but again more like an array or a collection.  There is no native method to take the object variable and
    specify .ToString() or cast its results as text.  You would need to iterate through each row and append it to another variable of type string, this could be done with a script task or ForEach container.
    Also you mentioned formatting the results.  What type of formatting were you looking for.  A limitation of the SMTP send mail task is that the message body doesn't support HTML so if you were looking at creating a table within the mail body you
    would have to use a script task or a custom component
    David Dye My Blog

  • Regarding hierarchy creation from sql tables using db / ud connect

    bw version 3.0 upgrading to 7.0
    sql version 2005.
    we had built a sql data mart which is being accesses by a number of reporting tools. BI is one of the systems connected to it. My requirement is to upload hierarchies like customer from the sql data mart in to BW.
    The sql tables are in a denormalized format like this,
    EMPLOYEE_ID LAST_NAME                 MANAGER_ID      LEVEL
            101 Kochhar                          100                             1
            108 Greenberg                        101                            2
            109 Faviet                           108                                3
    They say that all third party reporting tools will recognize the above format and it universal. <b>I wanted to know is there any setting in bw that will allow extraction of hierarchies from the above table format ? if not I can only think of arranging data in the format of BW transfer structure, similar to flat file load.</b>
    I want to know can I upload hierarchies from sql tables or should I create flat files from tables ?
    Inputs will be awarded points.
    Message was edited by:
            aravind sam

    generate datasource? see if this can help..
    RSA1-> SOURCE SYSTEM-> SELECT YOUR SOURCE SYSTEM-> RIGHT CLICK-> GENERATE SOURCE SYSTEM.
    Also check:
    DB connect ORACLE - table name not found
    Re: Bw With ORacle
    Datasource in DB Connect
    and OSS Notes: 518241
    assign points if useful ***
    Thanks,
    Raj

  • How to create pdf to be prepopulated from SQL Table

    I am having trouble generating a PDF that will add rows depending on the amount of records in my SQL Table. For example i am trying to generate a billing report on a monthly cycle. The data which i have in the table is for a certain client with a date range from 01/01/2010 - 01/31/2010. I need the table to gennerate rows for 15 different days and all i seem to get is the last record. Here is my Coldfusion Code
    <cfquery name="qBilling" datasource="PrintBilling">
        SELECT *
        From BillingRecord
    </cfquery>
        <cfoutput>
            <cfpdfform action="populate" source="billing.PDF">
                <cfpdfsubform name="Table1">
                    <cfpdfsubform name="Row1">
      <cfloop query="qBilling">
                            <cfpdfformparam name="Batch" value="#qBilling.batch#" index="1">
                            <cfpdfformparam name="Batch" value="#qBilling.batch#" index="2">
                            <cfpdfformparam name="Date" value="#DateFormat(qBilling.date,"mm/dd/yy")#">
                            <cfpdfformparam name="DateRange1" value="#DateFormat(Now(),"mm/dd/yy")#"> 
                            <cfpdfformparam name="DateRange2" value="#DateFormat(Now(),"mm/dd/yy")#">
                            <cfpdfformparam name="Documents" value="33333">
                            <cfpdfformparam name="PBcount" value="1252">
                            <cfpdfformparam name="PBpostage" value="999">
                            <cfpdfformparam name="Paper" value="5555">
                            <cfpdfformparam name="Price" value="1900">
                            <cfpdfformparam name="Rate" value="3.42">
                            <cfpdfformparam name="Type" value="SASAS-SS">
      </cfloop>
                    </cfpdfsubform>
                </cfpdfsubform>
            </cfpdfform>
        </cfoutput>
    The PDF itself is saved as a Static Form only because thats what ive seen as the common problem.
    Any help at all would be VERY much appreciated.

    I would make two summary tables that refers to the main table (the one you are currently sorting) :
    1) the first summarizes by color
    2) the second by model.
    It would be quicker if you can poast a screenshot of the data table and charts you are making so that any  examples are well suited to your specific case.

  • Set substitution variable from Sql table

    Hi guys,
    I am new to sql/unix so I hope you can guide me in the right direction.
    whats the easiest way to update an essbase subvar from a sql table?
    would I have to write a sqlplus statement to output the variable to file,
    read the file in a maxl command and set the variable and call these commands using .sh script and esscmd?
    is there a more efficient way to set the variable? e.g only use sqlplus and esscmd?
    thanks in advance,

    Try something like this
    echo off
    sqlplus -s username/passwordusername/password@server/SID:@server/SID:port @test.sql > variable.txt
    for /f "usebackq delims=" %%a in (variable.txt) do set CurrentMonth=%%a
    echo %CurrentMonth%
    See whether you are getting the correct month.
    Regards
    Celvin
    http://www.orahyplabs.com

  • Fetch only required fields from SQL Table

    Hi,
    We have a table like below which will get data thru a job.
    And I'm writing a Job/SP which will fetch 4 fields from that table and send  them in a Email to Admins informing how many new employee are added newly.
    How to loop thru these fields  and not only there might be a chance where we will have 100 records and I need to take only first 30 of them and send.
    EmpId
    Empname
    Deptname
    Designation
     Can any one has any solution on achieving this?
    Thanks

    Please refer the below link:
    http://beyondrelational.com/modules/2/blogs/77/posts/11386/sql-server-t-sql-different-ways-to-generate-a-comma-separated-string-from-a-table.aspx
    You need to use the Top30 query as your table in the script :
    select top 30 EmpID,EmpName,DeptName,Designation
    from tbl_name
    order by EmpID
    Eg: You may need to do for other columns:
    --WARNING: THIS SCRIPT IS PROVIDED AS-IS AND WITHOUT
    -- WARRANTY.
    -- FOR DEMONSTRATION PURPOSES ONLY
    --Step 01: Generate Temp table to store source data
    DECLARE @NamesTable TABLE (Id INT,
    Name NVARCHAR(50))
    --Step 02: Generate test data
    INSERT INTO @NamesTable VALUES (1,'A'),
    (2,'D'),
    (2,'C'),
    (3,'E'),
    (3,'H'),
    (3,'G')
    DECLARE @listIds VARCHAR(MAX) --DO NOT initialize this one!
    SELECT @listIds = COALESCE(@listIds + ',' ,'') + Cast(nt.Id as varchar(10))
    FROM @NamesTable nt Order by ID asc
    DECLARE @listNames VARCHAR(MAX) --DO NOT initialize this one!
    SELECT @listNames = COALESCE(@listNames + ',' ,'') + nt.Name
    FROM @NamesTable nt Order by ID asc
    SELECT 'EmpID: ' + @listIds+', EmpName: ' + @listNames

  • Can I create ASP user validated website using existing MD5 passwords from SQL table?

    I'm attempting to build a user authenticated site in Dreamweaver CS5 using an existing USERS table from another site.  The password field in the existing SQL table appears to be MD5 encoded.  How can I MD5 encode the form field (or the SQL query) so that it verifies MD5 to MD5?
    Currently, it's comparing the form's plain text field to the MD5 encrypted password field in SQL.
    I've built a simple login form using the following:
    <form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
        <input name="username" type="text" id="username" accesskey="u" tabindex="1" /><input name="password" type="password" id="password" accesskey="p" tabindex="2" /><input name="submit" type="submit" value="submit" />
        </form>
    With the stock Dreamweaver Log In User Server Behavior as follows:
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
    MM_valUsername = CStr(Request.Form("username"))
    If MM_valUsername <> "" Then
      Dim MM_fldUserAuthorization
      Dim MM_redirectLoginSuccess
      Dim MM_redirectLoginFailed
      Dim MM_loginSQL
      Dim MM_rsUser
      Dim MM_rsUser_cmd
      MM_fldUserAuthorization = ""
      MM_redirectLoginSuccess = "results.asp"
      MM_redirectLoginFailed = "error.html"
      MM_loginSQL = "SELECT user_name, password"
      If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
      MM_loginSQL = MM_loginSQL & " FROM dbo.users WHERE user_name = ? AND password = ?"
      Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsUser_cmd.ActiveConnection = MM_ADSX_STRING
      MM_rsUser_cmd.CommandText = MM_loginSQL
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 32, MM_valUsername) ' adVarChar
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 32, Request.Form("password")) ' adVarChar
      MM_rsUser_cmd.Prepared = true
      Set MM_rsUser = MM_rsUser_cmd.Execute
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccess = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccess)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    Please help!

    unfortunately classic asp does not have a built in function for md5. what we used for our legacy sites is a javascript that hashes a string to MD5. here's the code we've used in the past http://pajhome.org.uk/crypt/md5/md5.html
    your asp should have something like this...
    <script language="jscript" src="path_to_js_file/md5.js" runat="server"></script>
    <%
    'hash the password
    Dim md5password       ' md5password variable will hold the hashed text from form variable txtPassword
    md5password = hex_md5(""&Request("txtPassword")&"")
    ' based on the code you posted...
    MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 32, md5password) ' adVarChar
    %>

  • SP 2013 App CRUD from SQL table

    Could anyone point me in the direction of a tutorial or blog on how to make a Sharepoint 2013 app that reads/writes/updates/deletes data to a SQL table rather than a Sharepoint list?
    I've searched the usual places but haven't found anything.

    The below article explains on how to connect to SQL server from provider hosted app in AZURE
    http://blogs.msdn.com/b/alimaz/archive/2014/07/31/connect-sharepoint-online-to-an-on-premises-sql-server-from-an-azure-provider-hosted-app-using-hybrid-connections.aspx
    For your requirement, you can perform the CRUD operation to SQL in provider hosted app similar to .Net projects.
    Hope this helps.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Get the Last Value of Status Field from SQL TABLE using SQL 2008

    I have a table with Fields such as
    UploadstartTime, UploadEndtime, STATUS From TBLA.
    The STATUS Field, has values =7 and 11 are failed and 12 is SUCCESS. I cannot do a max, since it will always show 12, I need to get the MAX(UPLOADENDTIME, and get STATUS For that record. How can I do that using 1 SQL Query?
    My current code is: The issue is
    select
      TBLNAME
    MaxUploadstarttime
    =
    max(UploadStartTime),
    MaxUploadEndtime
    =
    max(UpLoadEndTime),
         Status=max(status)
    from  DB.DBO.LOGTABLE
    p1

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You failed! Temporal
    data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    >> I have a table with Fields such as <<
    Fields are not columns! There is no generic status in RDBMS. Putting “tbl-” in a table name is called tibbling and we make fun of people who do it (Google Phil Factor's humor columns. If you were polite is this what you wanted to post? 
    CREATE TABLE Something_Uploads
    (upload_source_name CHAR(15) NOT NULL,
     upload_start_timestamp DATETIME2(0) NOT NULL,
     PRIMARY KEY (upload_source_name, upload_start_timestamp),
     upload_end_timestamp DATETIME2(0),
     CHECK(upload_start_timestamp < upload_end_timestamp),
     upload_status INTEGER NOT NULL 
       CHECK (upload_status IN (7,11,12, ..))
    >> I cannot do a max, since it will always show 12, I need to get the MAX(UPLOADENDTIME, and get upload_status For that record [sic]. How can I do that using 1 SQL Query?  <<
    Since you told us nothing and gave no sample data, want to correct this postign? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Exlcuding data from SQL table in query

    I may have been working too many hours lately, or I'm simply losing my mind, but I'm having a heck of a time with a very strange result from a query
    I have a simple query that retrieves emails from a list
    SELECT emaillist_email
    FROM emaillist
    Now let's say the above gives 50,000 records
    Now take this
    SELECT emaillist_block_email
    FROM emaillist_block
    Say that gives 5,000 records
    Now put them together
    SELECT emaillist_email
    FROM emaillist
    WHERE emaillist_email NOT IN
    SELECT emaillist_block_email
    FROM emaillist_block
    Now unless I am losing it, I should get 45,000 records, presuming that the 5,000 are in both tables.
    The issue is, I get zero records.
    Any ideas?
    *** I Have solved the problem after digging a little deeper. There was a NULL record in the data which had been imported from XLS causing it to throw the query out, once I removed it the correct records were returned ***

    While you got your answer, using "not in" slows down queries.  Something like this would be faster.
    SELECT emaillist_email
    FROM emaillist eml
    WHERE not exists
    (select *
    from emaillist_block emb
    where emb.emailllist_block_email = eml.emaillist_email)
    Or better yet,
    alter table emaillist_email add column isBlocked bit default 0

  • Regarding downloading data into excel from internal table

    hi all ,
    i'm using the function module  SAP_CONVERT_TO_XLS_FORMAT to download data of internal table into excel . now i need to know . when user presses the button for downlading it should download after downloading if he again tries to download it in the same  should not allow him to download or  it should refresh the excel of the speecific path and then it should downlaod . please let me know how  make it.

    Hi,
    Use below FM
    call function 'MS_EXCEL_OLE_STANDARD_DAT'
    exporting
    file_name = p_file " path offile where u need to download
    CREATE_PIVOT = 0
    DATA_SHEET_NAME = ' '
    PIVOT_SHEET_NAME = ' '
    PASSWORD = ' '
    PASSWORD_OPTION = 0
    tables
    PIVOT_FIELD_TAB =
    data_tab = <dyn_table>  "internal table with data
    *fieldnames = int_head "internal table with header
    exceptions
    file_not_exist = 1
    filename_expected = 2
    communication_error = 3
    ole_object_method_error = 4
    ole_object_property_error = 5
    invalid_filename = 6
    invalid_pivot_fields = 7
    download_problem = 8
    others = 9
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Regards,
    Prashant

  • Creating Charts in MS - Excel from JSP tables

    Hi,
    Is there any way of taking the values in my JSP tables and passing them into ms-excel, and creating graphs or charts based on these values??
    I don't particulaly want to use a macro ... is this the only way? or does someone know an easier and more profficent way?
    Cheers

    graphs and charts - no. There is probably no easier way.
    Putting the values in is not hard. Just set the return type to vnd/ms-excel instead of text/html. And send the HTML table only. This will read into newer versions of excel fine. If for older versions then make your table comma delimited data instead. This can be done through style sheets using XML.
    Just some ideas. Without knowing more can't really help more.

  • Downloaded data in Excel from SAP table data to have the macro and control?

    We know that in SE16 screen to display SAP table data, there is a menu item or button to download the table data to excel sheet, but in the excel sheet, the data is for display only and some calculation functions (e.g. sum) are not be able to be downloaded to the excel sheet as macro.
    Our customers would like us to see if there is a way that in the excel sheet with the download SAP table data, only some certain rows/columns of data are allowed to be changed by customers or in other words, other areas in the excel sheet should be frozen and users can not even insert a column and do the copy/paste rows/columns.  And also the original calculated column in SAP table (e.g., sum) would be in the corresponding column in the excel sheet, but with macro to do the same function (e.g., sum).  After the customers perform some changes in some allowed certain rows/columns in the excel file, then the changed data can be uploaded back to SAP.
    Wonder if there are such ABAP program to fullfill the above task to download SAP table data to an excel file and to make the downloaded data in the excel with only some certain row/columns to be changeable and all other areas frozen?
    Thanks and we will give you reward points for valuable answers!

    Hi,
    This scenario can be met with the FM : RH_START_EXCEL_WITH_DATA
    This is available in Older versions. Starts Excel with a macro.
    I have never tried using this FM.
    However, I came across : http://www.jt77.com/development1/programming-23850.html
    Showing the use of it.
    To get useful hints, also refer :
    1) Transaction : DWDM
    2) MS EXCEL as OLE Client : 
    http://help.sap.com/saphelp_nw04/helpdata/en/40/b297f3c32711d194ac00a0c94260a5/frameset.htm
    3) Read the content at any table + Defined Macros used to call Function Modules
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c043d836-166c-2910-b99e-ae3633dec547
    Once you get a solution, would appreciate a mail to me @ <REMOVED BY MODERATOR>
    Cheers,
    Remi
    Edited by: Alvaro Tejada Galindo on Feb 29, 2008 5:41 PM

  • To retrieve data from sql table and pass to SAP

    Dear expert,
    My company is using e-store, customers place order thru the web, these orders are stored in sql server
    Now I want to retrieve this data then call BAPI to create sales order in SAP.
    What is the proper way ? RFC or DBCON ? Can RFC call BAPI ? I'm not familiar with RFC/DBCON.
    Please let me know how to do that ? Would appreciate if there is any sample given.
    Thanks

    Few Nice Blogs .
    Using ABAP to access non-SAP databases
    Installing DB Connect with MSSQL Server Database
    Thanks to Tony and Graham Robbo.

Maybe you are looking for

  • How can I transfer my contacts from one group to another?

    I have recently discovered that most of my personal contacts have been synced with my work's MS Outlook. This brings two issues to me if I ever had to change jobs and hand over my laptop - 1) My personal contacts will be shared with an unauthorised a

  • Adobe Flash Player says not installed when it is.

    Adobe Flash Player shows as installed on the primary Admin account (and works there) all other Admin and regular user accounts say it isn't installed. I have tried installing as various users and Administrator status, but I get the same response. "In

  • Dial plan change.Internal calls are dialing slow

    Hi, I have made dial plan change in one customer from 3 digits to 2.But there is an IVR with CTI ports with 3 digits and the first digit is overlapping with some 2 digits phones. So when you try to dial for example number 61 the CUCM is waiting for t

  • [FLASH8]C�mo abrir un .zip

    Hola, Utilizo la sentencia getURL(" http://www.midominio.com/archivo.zip","_blank") para descargar archivo.zip Me abre una ventana nueva con mensaje "No se encontr� ninguna p�gina" y sin darme la opci�n de abrir o guardar el archivo (estoy en explore

  • Can't save word file after conversion

    Hi, I convert a phd to word. The screen showed"export complete", i click "save", no file was saved in my drive. What is going on? Can anyone please help me? THKS LD