Launching Excel via LabWindows

Hello,
I want to launch and control Excel via labwindows, I found this example : https://decibel.ni.com/content/docs/DOC-21745#comm​ent-29359 which is perfect for me but when I am trying compiling it, I have thoses errors  :
     Undefined symbol '_ExcelRpt_WorksheetNew@12' referenced in "excelreportdemo.c".
     Undefined symbol '_ExcelRpt_ApplicationNew@8' referenced in "excelreportdemo.c".
     Undefined symbol '_ExcelRpt_WorkbookNew@8' referenced in "excelreportdemo.c".
Did someone have a solution about this problem?
Thank You.
Théo Martin

Hello Theo,
Looking in Library Tree, you don't have any instrument loaded. Since you have excelreport.fp in your project, the instrument "Excel Report" (which also loads "Microsoft Excel 9.0 Object Library") should be loaded when opening the project or adding the fp to the project.
Could you check if you have excelreport.fp on your computer (CVI installs it in C:\Program Files\National Instruments\<CVI DIR>\toolslib\activex\excel). If it is, it might be the case that the path in your project is not correct. Right-click on excelreport.fp in workspace three, select Replace File in Project.. and select the right file. Don't you get an error when you open the project?
You can also have a look on the example project C:\Users\Public\Documents\National Instruments\<CVI DIR>\samples\activex\excel\excelreportdemo.prj"

Similar Messages

  • Open .csv file in excel via Labwindows

    Hello
    After writing all my data in a .csv and closing it (using fclose), I would like to open this .csv file using Excel via a Labwindows command so that the user can see all the data. Is that possible? If yes, which function should I use?
    Thanks

    The simplest way of all is to issue the command OpenDocumentInDefaultViewer (): it should automatically open Excel with the document in it. It is equivalent of double-clicking the file in windows explorer.
    If it does not opens the file, you must verify that in windows CSV file extension is correctly associated with Excel application.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • ODI reading Excel via ODBC on Linux

    I've got ODI loading data from Excel via ODBC with everything running on Windows, and it runs fine!
    But will this work when I run ODI on a Linux platform? Will I have to buy some kind of ODBC driver for Excel under Linux? Has anyone done this before?
    Any help gratefully received!
    Thanks
    A

    There exists a native JDBC driver for excel, it is a sourcefourge project. This allows you to read excel data irrespective of platform through JDBC rather than having to use the JDBC/ODBC bridge.

  • Exporting .rep Files to Excel via openDocument?

    Hi,
    as the documentation states, only .rpt can be directly exported to excel via openDocument's sOutputFormat.
    Others created with Desktop Intelligence (.rep) can "only" be exported to PDF and HTML via sOutputFormat.
    However, in the WebIntelligence Toolbar there is the possibility to Export those .rep Files after generation.
    The URL for the export looks like /saveAsPDForXLS.jsp (or something like that), and as far as i remember a sEntry  GET var is passed with the query.
    This sEntry var - i suppose so - is an unique id for the freshly generated document?
    Anyway, my question is, isnt there a way to use openDocument to export .rep Files to excel?
    thanks!
    attila

    Hi Ted,
    exactly, but as i mentioned when the request is finished and e.g. the pdf document embedded in a frame shows up, there is the chance to export it via the toolbar to csv/excel.
    When selecting that option, a redirection to /saveAsXLSorPDF.jsp (or so) is fullfilled.
    I'm not sure what exactly happens between that redirect, maybe you can help me on that point.
    The sEntry parameter being passed to saveAsXLSorPDF.jsp, where from (or how) is it generated?
    Does the sEntry param depend on the openDocument URL request, Is there some special algoritm for generating that sEntry?
    To make it clear, what im thinking about is:
    I can make an openDocument URL Request
    sleep(20min)
    Make another request to saveAsXLSorPDF.jsp with the sEntry which i could generate by myself, if i knew what algorithm is underneath!
    Thanks in Advance
    attila

  • Excel has stopped working when I try to launch Excel 2013 Powerpivot

    Redirected from the Win 7 forum: (http://answers.microsoft.com/en-us/office/forum/office_2013_release-excel/excel-has-stopped-working-when-i-try-to-launch/01460690-abab-495f-ab5f-904f72f88668)
    My system is a Windows 7 machine, 64 bit
    I previously had Excel 2010 32bit with 32 both Powerpivot installed.  However I am currently evaluating 64 bit Excel 2013 with Powerpivot for my company so I uninstalled Excel 2010 and installed an evaluation copy of Excel 2013 64 bit.
    However whenever I launch Excel, enable Powerpivot, then click any of the Powerpivot buttons it gives me an error saying "Excel has stopped working".
    I took a look in the Windows events logs and found:
    Faulting application name: EXCEL.EXE, version: 15.0.4420.1017, time stamp: 0x506741b5
    Faulting module name: mscorwks.dll, version: 2.0.50727.5477, time stamp: 0x5265c8ee
    Exception code: 0xc0000005
    Fault offset: 0x00000000002ba203
    Faulting process id: 0x3e8c
    Faulting application start time: 0x01cf52a7644eda9d
    Faulting application path: C:\Program Files\Microsoft Office\Office15\EXCEL.EXE
    Faulting module path: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
    Report Id: afa4f824-be9a-11e3-94ac-415645000030
    I have tried uninstalling and re-installing as well as doing a Repair on my .net framework, which is the latest version.

    You can go to check the dll file, what's size of this dll file?
    If the file size is 0 byte, you can check the link below:
    http://forums.steampowered.com/forums/showthread.php?t=2735528
    Also you can go to check the disabled items (File->Options->Add-ins->Disabled items->Go) to see if any dll file was disabled.
    In addition, Isn't the latest version of .NET Framework supposed to be 4.0?(Not quite familiar with this)
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee
    the accuracy of this information.
    Wind Zhang
    TechNet Community Support

  • Teststand et excel via Active X

    Bonjour
    Je recherche le moyen de de realiser une liaison entre teststand et excel via ActiveX, a ce titre je cherche à connaitre le nombre de classeur ouvert et leur nom, comme le montre l'exemple suivant dans labview.
    En visual basic il suffit de faire un simple Workbooks.count   et ensuite Workbook.Item(1).Name
    Sous TestStand je n'arrive pas à realiser cette fonction 
    apres avoir creer un objet Excel  (reference Excel)  je recupere la propriete Worbook de  cette reference par la classe Application (_Application)  (voir images)
    Ensuite a parir de la reference recupérée precedement je compte le nb de classeur
    Classs (Worbook ) puis  get property ( count )
    Mais test stand me repond invariablement 1 alors que plusieurs classeurs sont ouvert.
    Autant dans labview les exemples sont nombreux autant pour teststand il n'y a que tres peu d'exemples.
    Auriez vous une solution ?
    Résolu !
    Accéder à la solution.

    Apres avoir passé pas mal de temps, j'ai enfin reussi à ecrire une sequence permettant de lire un fichier excel.
    L'atuce consiste à ecrire le code en labview (il existe de nombreux exemple) puis de retraduire en teststand les étapes en faisant attention à la syntaxe  notamment _Application ou _Workbooks
    Voici ci joint une bribe bien imparfaite de code, mais fonctionnelle.
    Il faut actualiser le fichier à ouvrir et la cellule à lire. Petit defaut non résolu, teststand ouvre plusieurs fois le meme fichier excel.
    Voici les deux autres exemples en complement.
    http://sine.ni.com/devzone/cda/epd/p/id/765
    http://ftp.ni.com/pub/devzone/epd/excel_example.seq
    Pièces jointes :
    test_4_excel.seq ‏8 KB

  • "Invalid type library" error when opening Excel via ActiveX

    Hi,
    I am trying to open Excel via ActiveX (Automation open function), for
    instance by running the
    build in example "Open Excel and make visible". However, on some computers,
    I recieve the error code -2147319784 "Old format or invalid type library".
    The problem seems to be that LabView is unable to recognize the ActiveX
    control, as it does not appear in the list "Select ActiveX Class". It works
    perfecly from Matlab though, so the control seem to be in order. I have also
    tried reinstalling Office.
    On most computers it works perfectly, but three identical Dell P4 900Mhz
    have the same problem.
    /Stefan Borg

    This may be happening due to different Excel versions, a vi made to control Excel 97 won't work for Excel 2000 and vice-versa. Be sure you are using the correct activeX calls for each one.
    Good luck

  • Export to Excel, via a Link on action page

    I have two questions.
    1) How can I export to excel, via a link.  So for example I have a form  and a user clicks submit and I cfoutput the data in a table on the same  page (action page is the same as the input page).  Now, once the data is  output, I would like a link on that same page so the user can click and  it will export the table to Excel.
    I have tried:
        <cfheader name="Content-Disposition" value="attachment; filename=test.xls">
        <cfcontent type="application/msexcel">
        <cfoutput query="qTest">
        <table>
        <tr>
        <th>Account</th>
        <th>Amount</th>
        </tr>
        <tr>
        <td>#qTest.ACCOUNT#</td>
        <td>#NumberFormat('#qTest.TotalAmt#', "_(999,999,999.99)")#</td>
        </tr>
        </table>
        </cfoutput>
    But once the page is loaded it tries to export automatically.  How can I  get it to export via a link?
    Also, someone suggested wrapping the cfoutput in a <cfsavecontent  variable="xyz"> tag, but once I do that, how do I put the "xyz"  variable into the <cfcontent> tag?  Or where do I use it?
    Thanks guys

    Here's some additional ways that you can format your output Excel Spreadsheet using CSS - I just copied this from one of my applications to give you an idea. Outputting to Excel is really nice because you can email the file off and you can put links into the cells or whatever. I normally display on the screen, then have the Excel Output button and just copy the whole query over to the Excel output page - it works for Office 2000 to 2007, haven't checked it on later versions. I kept this simple, but you can do all sorts of things with the Styles to make it look pretty. I did not include the query stuff as that would just clutter this up, but you'll get the picture.
    <CFCONTENT
        TYPE="application/msexcel">
    <CFHEADER
        NAME="Content-Disposition"
        Value="filename=JP1_Report.xls">
    <html
        xmlns:o="urn:schemas-microsoft-com:office:office"
        xmlns:x="urn:schemas-microsoft-com:office:excel"
        xmlns="http://www.w3.org/TR/REC-html40">
    <head>
        <title>Receipt List</title>
    <Style Type="text/css">
    .rowHeads {font-family:verdana;font-size:10pt;color:white;background:blue;font-size:8pt}
    </STYLE>
    </head>
    <body bgcolor="#0070a8">
    <TABLE>
    <TR>
    <TH class="rowHeads">PCT</TH>
    <TH class="rowHeads">Ticket</TH>
    <TH class="rowHeads">Cause</TH>
    <TH class="rowHeads">Defendant</TH>
    <TH class="rowHeads">Agency</TH>
    <TH class="rowHeads">Amnt<BR>Recd</TH>
    <TH class="rowHeads">Fine</TH>
    <TH class="rowHeads">Arrest</TH>
    <TH class="rowHeads">CVCF</TH>
    <TH class="rowHeads">CCC</TH>
    <TH class="rowHeads">JCPT</TH>
    <TH class="rowHeads">CHS</TH>
    <TH class="rowHeads">STF</TH>
    <TH class="rowHeads">Admin</TH>
    <TH class="rowHeads">DAO</TH>
    <TH class="rowHeads">FA</TH>
    <TH class="rowHeads">Time<BR>Pay</TH>
    <TH class="rowHeads">Traffic<BR>Fee</TH>
    <TH class="rowHeads">DDC</TH>
    <TH class="rowHeads">TPW</TH>
    <TH class="rowHeads">JCAD</TH>
    <TH class="rowHeads">FTA</TH>
    <TH class="rowHeads">JRF</TH>
    <TH class="rowHeads">JSF</TH>
    <TH class="rowHeads">JCTF</TH>
    <TH class="rowHeads">IDF</TH>
    </TR>
    <CFOUTPUT Query="GetReceipt">
    <TR>
    <TD style="border:solid 1px" align="center">#PrecinctID#</TD>
    <TD style="border:solid 1px" align="center">#ReceiptID#</TD>
    <TD style="border:solid 1px" align="center">#CauseNo#</TD>
    <TD style="border:solid 1px" align="left">#Off_LName#, #Off_FName# #Off_MI#</TD>
    <TD style="border:solid 1px"align="Left">#AgencyCode#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotalCredit,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocFine,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocArrestFee,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocCVCF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocCCC,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocJCPT,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocCHS,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocSTF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocAdminFee,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocDAO,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocFA,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocTimePay,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocTrafficFee,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocDDC,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocPAW,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocJCAD,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocTrafficFTA,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocJRF,"9999.99")#</TD>
    <TD style="border:solid 1px">#Numberformat(AllocJSF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocJCTF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(AllocIDF,"9999.99")#</TD></TR>
    </CFOUTPUT>
    <CFOUTPUT Query="GetTotals">
    <TR>
    <TD colspan="5">TOTAL</TD>
    <TD style="border:solid 1px">#NumberFormat(TotCred,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotFine,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotArrest,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotCVCF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotCCC,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotJCPT,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotCHS,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotSTF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotAdminFee,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotDAO,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotFA,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotTimePay,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotTrafficFee,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotDDC,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotPAW,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotJCAD,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotTrafficFTA,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotJRF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotJSF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotJCTF,"9999.99")#</TD>
    <TD style="border:solid 1px">#NumberFormat(TotIDF,"9999.99")#</TD>
    </TR>
    </CFOUTPUT>
    </TABLE>
    </body>
    </html>

  • BPC NW 10.0 - Over VPN connection, can't launch Excel add-in - can't download/install Office EPM add-in

    Dear All,
    I am facing a serious problem in BPC 10.0 NW version.
    I am using Windows 8.1(64 bit) and Firefox Version 30. And, trying to access BPC 10.0 web over VPN connection.
    After establishing VPN connection, I am able to login to BPC web. But, the landing page shows only the Admin link. It is not showing other links to laucnh Excel, Word, Powerpoint. Instead, as usual, There is a button(Install) to Install EPM office addin.
    When I clicked the Install button, download just stops immediately, showing the byte size as ZERO. I believe since I have established VPN connection, it is not letting me to go to the Internet to download the EPM office addin. It sounds logical. But, I need to resolve this i.e. I should be able to launch Excel interface from the BPC web(web interface). This issue is eating my time.
    I am getting the same result for IE 11.0 and Chrome 35.0 version browser as well.
    Pls. note that, I am able to launch Excel DIRECTLY from the machine and establish connection to BPC web and everything works fine here.
    Pls. help to resolve this.
    Thank you.
    Regards,
    Peri

    Hi Peri,
    I just wanted to know if you resolved the issue since I've been also getting the same issue and it's eating lots of time .. :-(
    Could you please share the solution if it's now working fine?
    Regards,
    Rachal

  • Commander des filtres excel via labview

    Bonjour,
    J'aimerais commander des filtres dans un tableau excel via labview. Est-ce que cela est possible ?
    Merci d'avance
    Résolu !
    Accéder à la solution.

    Pour ceux qui aurais le même problème, voici le lien qui m'a aidé
    http://forums.ni.com/t5/LabVIEW/How-to-filter-a-excel-spreadsheet-column-using-Labview/m-p/256723/hi...

  • Android Beta client refuses to launch RemoteApp via URI scheme

    Android Beta (8.1.7) client refuses to accept following URI: "rdp://full%20address=s:fqdn&remoteapplicationmode=i:1&remoteapplicationprogram=s:%7C%7Ccalc" with the error message "The RDP file is not valid. Notify your network administrator."
    But it can launch RemoteApp via equivalent RDP file:
    full address:s:fqdn
    remoteapplicationmode:i:1
    remoteapplicationprogram:s:||calc

    Hi,
    For URI scheme, please try to use “:” instead of “=” (equal sign) and recheck result. 
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to: migrate Form to Excel via DDE to Web Form functionality

    Old client/server environment 4.5 runtime has several forms going back and forth to excel via DDE.
    Want to migrate Forms into Web Forms environment using 9iAS ... anyone have ideas on how to best approach handling the excel spreadsheet related issues?
    Thanks in advance! John

    Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Oracle Forums FAQ
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>Announcement: Forums Etiquette / Reward Points
    <li>How to ask questions the smart way
    </ul>
    Following these simple guidelines will ensure you have a positive experience in any forum; not just this one! ;-)
    This is a fairly common question in the Forums. A simple search of the forum would have given you your answer! poelger provided a link to the Forms Upgrade Center - which is a great place to start! :)
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Submit Report as an attachement Excel via mail using planified job SM37

    Hi,
    I'm executing a program in background via job to get back the result of a report as an attachment XLS on mail.
    the result of my program give me just title of Excel columns , but when i execute it manually , the result is perfect.
    my code is :
    ******************************FORM MAIL*******************************
    FORM mail.
    CONCATENATE 'Expédition' 'TExp' 'PtOT' 'Crée' 'Crée le' 'St.' 'Déb.
    chargt'
    'Désignation' 'Div.' 'Doc. vente' 'Réceptionnaire' 'Nom1' 'Nom2'
    'Volume' 'UQ' INTO it_mess_att
    SEPARATED BY con_tab.
    CONCATENATE con_cret it_mess_att INTO it_mess_att.
    APPEND it_mess_att.
    CONCATENATE SPACE SPACE INTO it_mess_att
    SEPARATED BY con_tab.
    CONCATENATE con_cret it_mess_att INTO it_mess_att.
    APPEND it_mess_att.
    *CLEAR it_mess_att.
    LOOP AT it_tab into wa_tab.
    *VAL = it_tab-ZQTEMAX.
    CONCATENATE wa_tab-SHNUMBER wa_tab-SHTYPE
    wa_tab-TPLST wa_tab-CRE_NAME
    wa_tab-CRE_DATE wa_tab-OIG_SSTSF
    wa_tab-LOAD_STDTA wa_tab-VMODE_TEXT
    wa_tab-WERKS wa_tab-VBELN
    wa_tab-KUNNR wa_tab-NAME1
    wa_tab-CARRIER_DE
    wa_tab-WGT_UOM INTO it_mess_att
    SEPARATED BY con_tab.
    CONCATENATE con_cret it_mess_att INTO it_mess_att.
    APPEND it_mess_att.
    *CLEAR it_mess_att.
    ENDLOOP.
    ENDFORM.
    *************************FORM SEND_MAIL*******************************
    FORM send_mail .
    DATA: send_request TYPE REF TO cl_bcs,
    document TYPE REF TO cl_document_bcs,
    recipient TYPE REF TO cl_cam_address_bcs,
    bcs_exception TYPE REF TO cx_bcs,
    sent_to_all TYPE os_boolean,
    lt_fields TYPE TABLE OF w3fields,
    lt_html TYPE TABLE OF w3html.
    DATA: ld_error TYPE sy-subrc,
    ld_reciever TYPE sy-subrc,
    ld_mtitle LIKE sodocchgi1-obj_descr,
    ld_email LIKE somlreci1-receiver,
    ld_format TYPE so_obj_tp , ld_attdescription TYPE sopcklsti1-obj_descr,
    ld_attfilename TYPE so_obj_des , ld_sender_address LIKE
    soextreci1-receiver, ld_sender_address_type LIKE soextreci1-adr_typ,
    ld_receiver LIKE sy-subrc.
    DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_object_header LIKE solisti1 OCCURS
    0 WITH HEADER LINE, w_cnt TYPE i,
    w_sent_all(1) TYPE c, w_doc_data LIKE sodocchgi1.
    *MOVE p_email TO mailid.
    ***************ADD ADRESS MAIL**************
    p_email1-RECEIVER = mail .
    append p_email1.
    ld_email = mail.
    ld_mtitle = gd_attachment_desc.
    ld_format = 'XLS'.
    ld_attdescription = gd_attachment_desc.
    ld_attdescription = 'Liste expéditions PN'.
    CONCATENATE ld_attdescription '.XLS' INTO ld_attfilename.
    ld_attfilename = p_filename.
      ld_sender_address = w_sender.
      ld_sender_address_type = 'INT'.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_mess_att INDEX 1.
      w_doc_data-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_mess_att ).
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name = 'SAPRPT'.
      w_doc_data-obj_descr = gd_attachment_desc.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
    t_attachment[] = it_attach[]
    Describe the body of the message clear t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_mess_bod LINES
      t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_mess_att LINES t_packing_list-body_num.
      t_packing_list-doc_type = ld_format.
      t_packing_list-obj_descr = ld_attdescription.
      t_packing_list-obj_name = ld_attfilename.
      t_packing_list-doc_size =
      t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      loop at p_email1.
      t_receivers-receiver = p_email1-receiver.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      endloop.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
            document_data = w_doc_data
            put_in_outbox = 'X'
            sender_address = ld_sender_address
            sender_address_type = ld_sender_address_type
            commit_work = 'X'
       IMPORTING
            sent_to_all = w_sent_all
            TABLES packing_list = t_packing_list
            contents_bin = it_mess_att
            contents_txt = it_mess_bod
            receivers = t_receivers
       EXCEPTIONS
            too_many_receivers = 1
            document_not_sent = 2
            document_type_not_exist = 3
            operation_no_authorization = 4
            parameter_error = 5
            x_error = 6
            enqueue_error = 7
            OTHERS = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
      ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
      WAIT UP TO 5 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT' WITH output = 'X' AND RETURN.
    ENDFORM. " send_mail

    Hi,
    I'm executing a program in background via job to get back the result of a report as an attachment XLS on mail.
    the result of my program give me just title of Excel columns , but when i execute it manually , the result is perfect.
    my code is :
    ******************************FORM MAIL*******************************
    FORM mail.
    CONCATENATE 'Expédition' 'TExp' 'PtOT' 'Crée' 'Crée le' 'St.' 'Déb.
    chargt'
    'Désignation' 'Div.' 'Doc. vente' 'Réceptionnaire' 'Nom1' 'Nom2'
    'Volume' 'UQ' INTO it_mess_att
    SEPARATED BY con_tab.
    CONCATENATE con_cret it_mess_att INTO it_mess_att.
    APPEND it_mess_att.
    CONCATENATE SPACE SPACE INTO it_mess_att
    SEPARATED BY con_tab.
    CONCATENATE con_cret it_mess_att INTO it_mess_att.
    APPEND it_mess_att.
    *CLEAR it_mess_att.
    LOOP AT it_tab into wa_tab.
    *VAL = it_tab-ZQTEMAX.
    CONCATENATE wa_tab-SHNUMBER wa_tab-SHTYPE
    wa_tab-TPLST wa_tab-CRE_NAME
    wa_tab-CRE_DATE wa_tab-OIG_SSTSF
    wa_tab-LOAD_STDTA wa_tab-VMODE_TEXT
    wa_tab-WERKS wa_tab-VBELN
    wa_tab-KUNNR wa_tab-NAME1
    wa_tab-CARRIER_DE
    wa_tab-WGT_UOM INTO it_mess_att
    SEPARATED BY con_tab.
    CONCATENATE con_cret it_mess_att INTO it_mess_att.
    APPEND it_mess_att.
    *CLEAR it_mess_att.
    ENDLOOP.
    ENDFORM.
    *************************FORM SEND_MAIL*******************************
    FORM send_mail .
    DATA: send_request TYPE REF TO cl_bcs,
    document TYPE REF TO cl_document_bcs,
    recipient TYPE REF TO cl_cam_address_bcs,
    bcs_exception TYPE REF TO cx_bcs,
    sent_to_all TYPE os_boolean,
    lt_fields TYPE TABLE OF w3fields,
    lt_html TYPE TABLE OF w3html.
    DATA: ld_error TYPE sy-subrc,
    ld_reciever TYPE sy-subrc,
    ld_mtitle LIKE sodocchgi1-obj_descr,
    ld_email LIKE somlreci1-receiver,
    ld_format TYPE so_obj_tp , ld_attdescription TYPE sopcklsti1-obj_descr,
    ld_attfilename TYPE so_obj_des , ld_sender_address LIKE
    soextreci1-receiver, ld_sender_address_type LIKE soextreci1-adr_typ,
    ld_receiver LIKE sy-subrc.
    DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_object_header LIKE solisti1 OCCURS
    0 WITH HEADER LINE, w_cnt TYPE i,
    w_sent_all(1) TYPE c, w_doc_data LIKE sodocchgi1.
    *MOVE p_email TO mailid.
    ***************ADD ADRESS MAIL**************
    p_email1-RECEIVER = mail .
    append p_email1.
    ld_email = mail.
    ld_mtitle = gd_attachment_desc.
    ld_format = 'XLS'.
    ld_attdescription = gd_attachment_desc.
    ld_attdescription = 'Liste expéditions PN'.
    CONCATENATE ld_attdescription '.XLS' INTO ld_attfilename.
    ld_attfilename = p_filename.
      ld_sender_address = w_sender.
      ld_sender_address_type = 'INT'.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_mess_att INDEX 1.
      w_doc_data-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_mess_att ).
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name = 'SAPRPT'.
      w_doc_data-obj_descr = gd_attachment_desc.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
    t_attachment[] = it_attach[]
    Describe the body of the message clear t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_mess_bod LINES
      t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_mess_att LINES t_packing_list-body_num.
      t_packing_list-doc_type = ld_format.
      t_packing_list-obj_descr = ld_attdescription.
      t_packing_list-obj_name = ld_attfilename.
      t_packing_list-doc_size =
      t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      loop at p_email1.
      t_receivers-receiver = p_email1-receiver.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      endloop.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
            document_data = w_doc_data
            put_in_outbox = 'X'
            sender_address = ld_sender_address
            sender_address_type = ld_sender_address_type
            commit_work = 'X'
       IMPORTING
            sent_to_all = w_sent_all
            TABLES packing_list = t_packing_list
            contents_bin = it_mess_att
            contents_txt = it_mess_bod
            receivers = t_receivers
       EXCEPTIONS
            too_many_receivers = 1
            document_not_sent = 2
            document_type_not_exist = 3
            operation_no_authorization = 4
            parameter_error = 5
            x_error = 6
            enqueue_error = 7
            OTHERS = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
      ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
      WAIT UP TO 5 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT' WITH output = 'X' AND RETURN.
    ENDFORM. " send_mail

  • Problem launching Excel sheet from Button hyperlink

    Re: Access 2010 / Excel 2010 on Win 7 Professional
    The Problem:
    =============
    When I try to launch an Excel file (Dashboard sheet) from a hyperlink in a command button in an Access app, I get this error in the form of two message boxes:
    Message box:
    "You can't exit <application name> now".
    "If you're running a Visual Basic module that is using OLE or DDE, you may need to interrupt the module."
    (I simply clicked 'OK' on this first message)
    2nd Message box displayed at the same time from Microsoft Access:
    "A potential security concern has been identified.  This location may be unsafe.
    "MySheet1.xlsx".  Hyperlinks can be harmful to your computer and data.  To protect your computer, click only those hyperlinks from trusted locations.  Do you want to continue?"
    Yes/No
    At this point, if I answer 'yes' on this 2nd message, the spreadsheet will open normally.
    The Background:
    ================
    The button that launches the Excel app is on a simple blank form.  No other controls are on this form and there is no VBA code behind the form, just a hyperlink property is set in the hyperlink property in the button that points to the Excel file.
    In Access, under Options/Client Settings"
    These two are checked:
      -- Ignore DDE requests
      -- Enable DDE refresh
    I have a command button that has a hyperlink to an Excel sheet on my local drive.  (Both the database application and the Excel file are on my local drive)  The hyperlink of the button points to the Excel file on the local drive.
    The Excel file comes up fine by itself outside of the application, no problem.
    The Question:
    ==============
    How do I disable these two messages mentioned above so the user is not inundated with them everytime they want to launch the Excel dashboard sheet from the command button?  The button in the Access app has no VBA code behind it, just a hyperlink set in
    the "Hyperlink Address" property.   Is there a way to launch it with VBA code and not get these messages?   Both the Access app and the Excel file exist in the same directory on the local C drive.
    Thank you for your assistance....
    RLN

    Hi,
    Thank you for posting in the MSDN Forum.
    Since the issue is more relate to the end-user, I'd like to move it to Office 2010 - IT Pro General Discussions forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Best regards
    Fei
    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.

  • Launch application via run menu rather than dos...possible?

    hi,
    we're trying to find a way to launch a application, such as MS Word, from our java app via the run menu in start menu, rather than through dos. currently our program reads the start menu and gets the lnk file paths, the problems is that it displays them as:
    C:\WIN98_SE\start menu\programs\Microsoft Word.lnk
    but dos needs them as:
    C:\WIN98_SE\startm~1\programs\Micros~3.lnk
    so to execute it from java we would need to write it as:
    Runtime.getRuntime().exec("start C:\\WIN98_SE\\startm~1\\programs\\MICROS~3.lnk");
    since we're doing this dynamically we can't be sure if the user will have office professional, home, or any other version, so this means that for some micros~3 might be micros~1, not sure which number will be attached at the end. but if we are able to launch it from the run command in the start menu then typing:
    C:\WIN98_SE\start menu\programs\Microsoft Word.lnk
    will work.
    Thanks.

    You should try this:
    Runtime.getRuntime().exec("command /C \"C:\\WIN98_SE\\start menu\\programs\\Microsoft Word.lnk\" "); with Win98
    orRuntime.getRuntime().exec("cmd /C \"C:\\WINNT\\Documents and Settings\\user-name\\Start Menu\\Programs\\Microsoft Word.lnk\" "); with Win2000 prof.
    /C - Carries out the command specified by string and then terminates
    I tested only the second one because I don't have access to a win98 system.
    Let me know if this solves your problem.
    Regards
    BG

Maybe you are looking for

  • Not getting the excpected result.

    Hi all, My object is write a java program so tht...it'll generate the .pdf file after retriving the data from MS-Excel file. I used POI HSSF to read the data from MS-Excel and used iText to generate .pdf file: My Program is: * Created on Apr 13, 2005

  • Best way to organize photos and home video

    Looking for the optimum way to organize photos and home videos. Goal is to have all devices have equal access to all the media. Just as important is for this to be as easy as possible to maintain and use. Have an iMac with iTunes and iPhoto Have mult

  • SQL script: dynamic table creation

    Hello, I should write a sql script to do the following (simplified): - Create a table if it doesn't exist yet - Select something from the newly created table and do further conditional actions I've tried something like that: DECLARE lv_count INTEGER;

  • After reinstalling OS X Mavericks, iTunes doesn't recognize my photosphotos...

    Hi, everybody, After formating my iMac and reinstalling OS X Mavericks, iTunes doesn't recognize my photos. They are there in iPhoto, but when I try to synch them with my iPhone, for example, iTunes shows the Events, but tell that they're empty (but

  • Guest Logins

    We recently implemented activity reporting in our portal. Looking at the reports we are seeing a small number of annoymous users logging in as 'Guest'. We are not sure where these guests are coming from or how they are logging in. How would someone l