Query to Excel problem

Hi,
I create a cfm to export data from my query, qOrds (which
comes from my cfc).
I actually have a button in flex which, when I click, needs
to export data from my query to Excel.
My flex button calls the following function :
My function in Flex
public function RetrieveExcel():void
var urll:URLRequest = new URLRequest("
http://bang:8500/dcsnew/Export2xls.cfm");
navigateToURL(url,"_blank");
Text
HERE is my Exportt2xls.cfm
<cfinvoke component="mycfc.cfc" method="getOrds"
returnvariable="qOrds">
<cfinvokeargument name="mydate" value="#url.mydate#">
</cfinvoke>
<CFCONTENT TYPE="application/vnd.ms-excel">
<cfheader name="Content-Disposition"
value="filename=report.xls">
<cfquery name="exportdata" dbtype="query">
SELECT *
FROM qOrds
</cfquery>
<table>
<cfoutput>
<tr>
<cfloop list="#exportdata.columnlist#" index="TDFIELD">
<td>#TDFIELD#</td>
</cfloop>
</tr>
</cfoutput>
<cfoutput query="exportdata">
<tr>
<cfloop list="#exportdata.columnlist#"
index="COLUMNNAME">
<td>#exportdata[COLUMNNAME][exportdata.currentrow]#</td>
</cfloop>
</tr>
</cfoutput>
<cfreturn #exportdata#>
I have a date argument that I want to pass to the cfm.
But when am running the function, it is giving me the
following error :
"Element mydate is undefined in URL."
Where do I need to pass the variable "mydate" in my flex
code.
Any help would be highly appreciated.
Thx

var urlString:String =
http://bang:8500/dcsnew/Export2xls.cfm?myDate="
+ myDataVar;
var url:URLRequest = new URLRequest(urlString);

Similar Messages

  • Excel Query case sensitive problem

    HI all I am writing query in excel to join table. however I find it is case sensitive.  which cause many trouble.
    how to make it case incensitive.
    SELECT *
    FROM `C:\compare.xlsx`.`sheet1$` a
    left join `C:\compare.xlsx`.`sheet2$` b
    on a.`name`=b.`name`
    union
    SELECT *
    FROM `C:\compare.xlsx`.`sheet1
    right join `C:\compare.xlsx`.`sheet2$` d
    on c.`name`=d.`name`

    Hi,
    I tested it with my data source (I create it like this, not use all of the month). Would you like to share us a sample file through OneDrive if possible?
    If you have further question about the SQL sentence, I recommend you post your issue to SQL forum.
    http://social.technet.microsoft.com/Forums/en-US/home?category=sqlserver
    Regards,
    George Zhao
    TechNet Community Support

  • Ask again user and pass, when download query on excel on BW3x

    Dear,
            When try download query at excel, ask me again user and pass, can you help me about that.
    best regards
    OArenas

    Good day,
    This sounds like you are not using an anonymous user or alias users ..??
    When you download into Excel, the cookie for the MIME handler is not held. This means that the system needs to verify the userid/password again. Check out the SAP Notes 516884 and 487456 - there are some other SAP Notes referenced in these that may also be helpful if you still have a problem.
    Regards,
    Karen

  • Procedure to save the output of a query into excel file or flat file

    Procedure to save the output of a query into excel file or flat file
    I want to store the output of my query into a file and then export it from sql server management studio to a desired location using stored procedure.
    I have run the query --
    DECLARE @cmd VARCHAR(255)
    SET @cmd = 'bcp "select * from dbo.test1" queryout "D:\testing2.xlsx;" -U "user-PC\user" -P "" -c '
    Exec xp_cmdshell @cmd
    error message--
    SQLState = 28000, NativeError = 18456
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'user-PC\user'.
    NULL
    Goel.Aman

    Hello,
    -T:
    Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. The security credentials of the network user,
    login_id, and password are not required. If
    –T is not specified, you need to specify
    –U and –P to successfully log in.
    -U:
    Specifies the login ID used to connect to SQL Server.
    Note: When the bcp utility is connecting to SQL Server with a trusted connection using integrated security, use the
    -T option (trusted connection) instead of the
    user name and password combination
    I would suggest you take a look at the following article:
    bcp Utility: http://technet.microsoft.com/en-us/library/ms162802.aspx
    A similar thread regarding this issue:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b450937f-0ef5-427a-ae3b-115335c0d83c/bcp-connection-error-sqlstate-28000-nativeerror-18456?forum=sqldataaccess
    Regards,
    Elvis Long
    TechNet Community Support

  • Query in item problem

    Hellou everybody.
    I need your help. I am using forms 6i and i have a block with some non DB items. But items are synchronize with DB items for viewing results. I use this items for diplaying results from DB tables. In enter query mode i write condition in this text items and execute query.
    My problem is that i have text item which is VARCHAR2 type and I need to enter the condition for example > 1000. But i don't know how to convert this field to number. When i execute query under char type it not work properly (other result). I tried to change data type to number but i can't because it's not alowed to mixed types.
    select * from table_name where pag_cis > 100 - i need this
    select * from table_name where pag_cis > '100' - i have this
    Can you help me???

    You may use the set_block_property procedure built-in and the 'default_where' property so as to execute the query using the contents of your item (with the name of column , of course).
    Afterwards , you navigate to the db items block (with go_block('blockname')) and execute the query (built-in 'execute_query').
    Hope it helps
    Sim

  • Oracle SQL Query from EXCEL 2007 with prompt

    Hello,
    I have many excel reports where I am pulling information from our Oracle 9 db through Excel using the following method:
    http://blog.mclaughlinsoftware.com/microsoft-excel/how-to-query-oracle-from-excel-2007/
    http://blog.mclaughlinsoftware.com/2009/11/30/sql-query-in-excel-2007/
    However, I am having trouble when I try the following query due to the prompt:
    SELECT
    IM.ITEM_GROUP,
    IM.ITEM,
    IM.DESCRIPTION
    FROM
    LAWSON.ITEMMAST IM
    WHERE
    IM.ITEM = '&ITEM';
    Does any one know how I can connect a prompt to an excel cell and then pass the query on to Oracle, or have a PL SQL prompt work from Excel?
    Thanks,
    Ben

    The 'prompt' as you call it is a sqlplus feature, so does not belong to the SQL language
    You would need to write a stored procedure returning a resultset.
    create or replace procedure foo(rc in out sys_refcursor, p_item) as
    begin
    open rc for
    'SELECT
    IM.ITEM_GROUP,
    IM.ITEM,
    IM.DESCRIPTION
    FROM
    LAWSON.ITEMMAST IM
    WHERE
    IM.ITEM = '||p_item;
    end;
    and call that using ODBC or asp.net
    Obviously this is profusely documented.
    Sybrand Bakker
    Senior Oracle DBA

  • I cant export my pdf to excel - Problem with conversion

    I cant export my pdf to excel - Problem with conversion
    Somebody is having this problem?

    Hi,
    May i know what is the challenge you are facing?
    Check with another file.
    You can try with different browser as well.
    Regards,
    Florence

  • Query to Excel

    I have a page that displays results of a search query. I'd
    like to give users an option to export the results that they see
    into Excel format by clicking on an icon.
    How can I do that?
    I do have an UDF that convert query to Excel and takes query
    as an argument. Anyway I can call it after the page's been
    rendered?
    Any suggestions welcome.
    Thank you

    I used to use the html method which is very simple - generate
    your output in an html table, save it to a file with an .xls
    extension and then open it using cfcontent. Excel automatically
    converts the html table into excel rows and columns and some basic
    formatting is also retained.
    More recently however I've been using Jakarta POI which is
    simple to use and much more powerful. I won't try explaining how to
    use it as there's a page that already does a nice job of it
    >>HERE<<
    cheers

  • Excel problem StarStarStarStarStar Written by MA from Dubai  i have problem in excel when i write Arabic or i receive any excel file contain Arabic word it come like letters it do not come like word my Microsoft office is 2011 what i can do

    excel problem
    i have problem in excel when i write Arabic or i receive any excel file contain Arabic word it come like letters   it do not come like word
    my Microsoft office is 2011
    what i can do

    MS Office for Mac does not really support Arabic.  But you may just have a font problem.  Disconnected letters means a Windows font is being used.  Change the font to a Mac font like Geeza Pro.
    For better Arabic support, try OpenOffice.

  • Query 2 Excel

    Anyone know where I can find a good Query 2 Excel UDF that
    allows me to
    specify a query and what column headers to export into either
    a CSV or an
    XLS.
    Seems like all the ones I find are confusing or don't allow
    me to specify
    the column headers on the outputed excel document.

    I've attached my code that exports a query to an XLS.
    Basically you set it up with
    <cfcontent type="application/msexcel">
    <cfheader name="Content-Disposition" value="inline;
    filename=All_Leads.xls" charset="utf-8">
    Then build your table in HTML and whatever is there, is how
    it will be in XLS.

  • Additional Controls vba for Excel "problem"

    Additional Controls vba for Excel "problem" Failure to appear when you press its button. I am using Office 2013 and Windows OS 8 (32bit).
    Note
    should
    focus on, I
    use Office
    2013
    - the
    system
    Windows 8
    (32-bit).
    Please help me, and accept a multitude of thanks and respect..

    Hi ghass
    Your question is not belong to the current Windows Store App dev forum.
    To help you move the thread to the correct forum, I would ask you some questions: Is your issue a build-in ActiveX control issue?
    I will move your thread to either OfficeDev forum or Office consumer forum.
    Thanks for your understanding.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem with SQL Query in Excel VBA

    I am trying to retrieve data from a SQL table using Excel VBA.  The query will only return data from the first field in the query.  this is the code I am using:
    objGroupConn.Open
    Set objGroupCmd.ActiveConnection = objGroupConn
    objGroupCmd.CommandText = "SELECT GroupName, GroupNotes, GroupTotal, ArrivalTime" _
    & " FROM dbo.tblGroups" _
    & " WHERE((tblGroups.VisitDate)= '" & vdate & "')"
    objGroupCmd.CommandType = adCmdText
    objGroupCmd.Execute
    Set objGroupRecordset.ActiveConnection = objGroupConn
    objGroupRecordset.Open objGroupCmd
    ActiveSheet.Range("BN5").CopyFromRecordset (objGroupRecordset)
    objGroupRecordset.Close
    objGroupConn.Close
    The query is asking for information from 4 fields and only returns GroupName.  Any ideas?

    Hi GAMinTN,
    I can't reproduce your problem, if I created the same table as yours, I can successfully retrieve the data from the table and copy to the specified range.
    I recommend that you firstly check if the table in the database contains the proper data in all the 4 columns. Since the command text can be executed successfully and get the data of one column, it should be able to get the data from the other columns.
    Also please debug your code, check if the objGroupRecordset contains the proper data, and try to execute the SQL statement directly in the Sql Server, make sure the SQL statement is correct.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Ad-hoc query - excel problem

    Hi,
    I am trying to run an ad-hoc query to generate previous employer's report.When I click on Hit - list, it shows me 2,195 persons listed.However, when I click on output, it generates only 234 employees in the excel sheet.
    Could anyone please help me as to why this is happening??
    Priority:HIGH
    Thanks in advance.
    Regards,
    Angel

    Hi,
    I am trying to run an ad-hoc query to generate previous employer's report.When I click on Hit - list, it shows me 2,195 persons listed.However, when I click on output, it generates only 234 employees in the excel sheet.
    Could anyone please help me as to why this is happening??
    Priority:HIGH
    Thanks in advance.
    Regards,
    Angel
    Hi Angel,
    Check what Kumarpal has said, he may be correct.
    What I would ask u to do is, ask your ABAP-er to pull a report from the table level using SE11. See what is the number of hits.If there is a difference then the Query behind Ad-Hoc query is not working properly.
    The reason for your problem could be many if not one.
    Regards,
    ARNAV...

  • Problem in opening query in excel 2007

    Hi All,
    I am using MS office 2007.
    But I am not able to use BEx with excel 2007.
    I have SAP GUI 7.10 Installed also i have installed Excel As a viewer.
    then also i am getting same problem.
    So i request you to please guide me with this issue.
    And as I don't have access for SAP NOTES, so plz don't suggest me any note to go through.
    Its request.
    Thanx,
    Vishal

    Hi Vishal,
    When you have BEx with Excel 2007,
    There will be an option "Add-Ins" tab,plugged in with Excel 2007.
    Click Add-Ins->You will find the BEx Analysis and Design Toolbox in that.
    This will allow you to work with BEx Analyzer and Excel 2007.
    Revert me in case of any clarifications.
    Rgds,
    Murali

  • Query results to Excel problems

    I'm trying to get results from a ColdFusion query called q to go into an Excel file.
    There are 2 things going wrong.
    1. An Excel message comes up that says "The file you are trying to open 'stc.xls', is in a different format than specified by the file extension..."
    2. character values in col1 01,02,03,... are coming over to Excel as numbers 1,2,3,...
    How do I fix those 2 things ?
    This is the way I'm trying to do it.
    <cfsetting enablecfoutputonly="yes">
    <cfcontent type="application/msexcel">
    <cfheader name="Content-Disposition" value="filename=test.xls">
    <cfoutput>
       <table>
          <cfloop index="ii" from="1" to="#q.recordcount#">
             <tr>
                <td>
                  #q.col1[ii]#
                </td>
                <td>
                  #q.col2[ii]#
                </td>
             </tr>
          </cfloop>
       </table>
    </cfoutput>

    Dan Bracuk wrote:
    Using html table tags stopped working when MS introduced Office 2007.  Use cfspreadsheet instead.
    It is not that it stopped working. Excel 2007 introduced extension hardening for increased security. So Excel warns you when the file content does not match the file extension, such as your code where cfheader claims it is an *.xls file but the content is actually html.
    Users can still open the file, they will just get a warning first. The only way to prevent the warning is to a) disable the registry setting which controls the behavior OR b) ensure the content matches the file extension. For example, generating a true Excel file with cfspreadsheet or the POIUtility.  Another option is to generate an Excel xml file. IIRC, Ben Nadels blog also has some good articles on that as well.

Maybe you are looking for

  • Closed loop configuration question

    I have a motor(with encoder feedback) attached to a linear actuator(with end limit switches). The motor has a commercially bought servo drive for control.  The servo drive will accept either a step/direction (2 seperate TTL digital pulse train inputs

  • ISE 1.1.2 patch 8 NTP Service failing

    Hi all, after a recent upgrade of my ISE deployment from 1.1.1 patch 3 to 1.1.2 patch 8, the NTP service on the ISE now crashes at regular intervals. Can I have some help debugging this issue? I would like to check the logs but there are so many that

  • Opening Adobe Bridge CC on a Windows 7 OS.

    I cannot get Adobe Bridge CC to open on a Windows 7 OS. I have found a discussion on this that gives a solution for the Mac, but not Windows. Any suggestions?

  • MacBook Pro Grey screen 4-8x a night

    Over the past week my computer just pauses then restarts to the logon screen...usually the computer does this once or twice but this is very consistent 4-8x a day.  I have a MacBook Pro 3,1; 2.2 GHz core duo, 4 gb ram,  system 10.6.8 Any help?  This

  • Anyone hook up Airport Extreme to a WD HD player?

    I have a Western Digital HD media player being shipped to me and I know it isn't equipped with any ethernet connector. Does anyone think its possible to daisy chain the airport extreme, to an external hard drive and then to the WD HD player? This way