Export data to Excel/PDF from e.g. a repeater tag?

Hi,
The repeater tag as well as the grid tag are very useful. But what if we would like to provide functionality for the user export the data shown further to Excel/PDF?
I looked at http://displaytag.sourceforge.net/ which gives this possibility out of the box.
Others done anything similiar with BEA netui tags?
Perhaps creating your own custom tag?
Regards,
Tonny Gundersen
Accenture

Hi SAP,
Simply List -> Save -> File -> spreadsheet -> file.xls
Or check this weblog..
<a href="/people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel:///people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel
or
try this code..
DATA : file_name TYPE ibipparms-path,
lc_filename TYPE string.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
file_name = file_name .
lc_filename = file_name.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = lc_filename
filetype = 'DAT'
TABLES
data_tab = gt_itab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Revert back for more help
Reward points if helpful
Regards
Naresh

Similar Messages

  • How to extract the data into Excel / PDF from SAP

    Hi,
    We have spool number of a report output.
    We want to extract the data into Excel / PDF from SAP directly...
    Plz guide...

    Hi ,
    Please check this [Thread|HOW TO DOWNLOAD SAP OUTPUT TO EXCEL FILE;. Hope your problem will be solved.
    You can check [this also.|http://wiki.sdn.sap.com/wiki/display/sandbox/ToConvertSpoolDataintoPDFandExcelFormatandSenditinto+Mail]
    Thanks,
    Abhijit

  • Exporting data to Excel 2007 from SAP report

    Dear all,
    Earlier we used to have Excel 2003 and while downloading data from MC.9 Report - Export - Transfer to XXL, we could able to download the data.
    Now we have installed Excel 2007 and trying to download the data from MC.9 report, its opening excel, but no data is being copied,,, blank excel sheet,,,, further we could not able to download the data.
    Is there any setting need to be done in SAP reporting or excel 2007 to download the data to Excel 2007.
    thanks in advance.
    urendra

    Pl. go through the following step.
    1. Execute MC.9
    2. Select (click on) key figure column
    3. Select  Time series Button (CtrlShiftF4)
    Now seperate window will come.
    4. Select the button Save to PC file (shift+F8)
    By this procedure you can download to excel
    Regards
    Amol

  • Exporting data into excel sheet from CRM

    Hi All,
    I am facing problem while extracting data from CRM - Service Process Monitor.
    I tried to extract data(records) from executed service process monitor through
    System -> List ->Save->Local file->Spreadsheet
    I am not getting actual records list in excel sheet
    For example: Actual record - 244, But after extracting to excel sheet its showing only- 199
    why its not extracting remaining 45 records/ transactions.
    is there any setting or is there any other process of extracting ?
    How to count total records without extracting to excek sheet ?
    Please help me..
    Regards
    Praveen Khot

    Hi
    check the link below
    https://www.sdn.sap.com/irj/sdn/crm-elearning
    Reward points if helpful
    Dinaker vikas

  • How to export sql table data to Excel/PDf using Storedprocedure?

    Hi ,
            I have one table in sqlserver2008R2 that named "Customer" so that table hold the 1 Lac rows. Now I want send this table data to Excel/pdf with Columns using Storedprocedure.
       I have tried this using xp_cmdshell so This is not working for me.
    finally i want to get data in Excel and pdf also.
    Please guide me

    You can actually run an Excel Macro to grab the data from the SQL Server DB.  Below are some samples.
    Sub ADOExcelSQLServer()
    ' Carl SQL Server Connection
    ' FOR THIS CODE TO WORK
    ' In VBE you need to go Tools References and check Microsoft Active X Data Objects 2.x library
    Dim Cn As ADODB.Connection
    Dim Server_Name As String
    Dim Database_Name As String
    Dim User_ID As String
    Dim Password As String
    Dim SQLStr As String
    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    Server_Name = "Excel-PC\SQLEXPRESS" ' Enter your server name here
    Database_Name = "Northwind" ' Enter your database name here
    User_ID = "" ' enter your user ID here
    Password = "" ' Enter your password here
    SQLStr = "SELECT * FROM dbo.Orders" ' Enter your SQL here
    Set Cn = New ADODB.Connection
    Cn.Open "Driver={SQL Server};Server=" & Server_Name & ";Database=" & Database_Name & _
    ";Uid=" & User_ID & ";Pwd=" & Password & ";"
    rs.Open SQLStr, Cn, adOpenStatic
    ' Dump to spreadsheet
    With Worksheets("sheet1").Range("a1:z500") ' Enter your sheet name and range here
    .ClearContents
    .CopyFromRecordset rs
    End With
    ' Tidy up
    rs.Close
    Set rs = Nothing
    Cn.Close
    Set Cn = Nothing
    End Sub
    Sub ADOExcelSQLServer()
    Dim Cn As ADODB.Connection
    Dim Server_Name As String
    Dim Database_Name As String
    Dim User_ID As String
    Dim Password As String
    Dim SQLStr As String
    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    Server_Name = "LAPTOP\SQL_EXPRESS" ' Enter your server name here
    Database_Name = "Northwind" ' Enter your database name here
    User_ID = "" ' enter your user ID here
    Password = "" ' Enter your password here
    SQLStr = "SELECT * FROM Orders" ' Enter your SQL here
    Set Cn = New ADODB.Connection
    Cn.Open "Driver={SQL Server};Server=" & Server_Name & ";Database=" & Database_Name & _
    ";Uid=" & User_ID & ";Pwd=" & Password & ";"
    rs.Open SQLStr, Cn, adOpenStatic
    With Worksheets("Sheet1").Range("A2:Z500")
    .ClearContents
    .CopyFromRecordset rs
    End With
    rs.Close
    Set rs = Nothing
    Cn.Close
    Set Cn = Nothing
    End Sub
    Sub TestMacro()
    ' Create a connection object.
    Dim cnPubs As ADODB.Connection
    Set cnPubs = New ADODB.Connection
    ' Provide the connection string.
    Dim strConn As String
    'Use the SQL Server OLE DB Provider.
    strConn = "PROVIDER=SQLOLEDB;"
    'Connect to the Pubs database on the local server.
    strConn = strConn & "DATA SOURCE=(local);INITIAL CATALOG=NORTHWIND.MDF;"
    'Use an integrated login.
    strConn = strConn & " INTEGRATED SECURITY=sspi;"
    'Now open the connection.
    cnPubs.Open strConn
    ' Create a recordset object.
    Dim rsPubs As ADODB.Recordset
    Set rsPubs = New ADODB.Recordset
    With rsPubs
    ' Assign the Connection object.
    .ActiveConnection = cnPubs
    ' Extract the required records.
    .Open "SELECT * FROM Categories"
    ' Copy the records into cell A1 on Sheet1.
    Sheet1.Range("A1").CopyFromRecordset rsPubs
    ' Tidy up
    .Close
    End With
    cnPubs.Close
    Set rsPubs = Nothing
    Set cnPubs = Nothing
    End Sub
    Finally, you can run a SProc in SQL Server, from Excel, if you want the SProc to do the export.
    Option Explicit
    Sub Working2()
    'USE [Northwind]
    'GO
    'DECLARE @return_value int
    'EXEC @return_value = [dbo].[TestNewProc]
    ' @ShipCountry = NULL
    'SELECT 'Return Value' = @return_value
    'GO
    Dim con As Connection
    Dim rst As Recordset
    Dim strConn As String
    Set con = New Connection
    strConn = "Provider=SQLOLEDB;"
    strConn = strConn & "Data Source=LAPTOP\SQL_EXPRESS;"
    strConn = strConn & "Initial Catalog=Northwind;"
    strConn = strConn & "Integrated Security=SSPI;"
    con.Open strConn
    'Put a country name in Cell E1
    Set rst = con.Execute("Exec dbo.TestNewProc '" & ActiveSheet.Range("E1").Text & "'")
    'The total count of records is returned to Cell A5
    ActiveSheet.Range("A5").CopyFromRecordset rst
    rst.Close
    con.Close
    End Sub
    Sub Working()
    'USE [Northwind]
    'GO
    'DECLARE @return_value int
    'EXEC @return_value = [dbo].[Ten Most Expensive Products]
    'SELECT 'Return Value' = @return_value
    'GO
    Dim con As Connection
    Dim rst As Recordset
    Set con = New Connection
    con.Open "Provider=SQLOLEDB;Data Source=LAPTOP\SQL_EXPRESS;Initial Catalog=Northwind;Integrated Security=SSPI;"
    Set rst = con.Execute("Exec dbo.[Ten Most Expensive Products]")
    'Results of SProc are returned to Cell A1
    ActiveSheet.Range("A1").CopyFromRecordset rst
    rst.Close
    con.Close
    End Sub
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Export data into Excel from PL/SQL Block

    Hi,
    Please tell me how to export data into excel comming out from PL/SQL code in APEX.
    We can simply export data into excel if we have Report region, but my query is dynamic for which i had to use PL/SQL block. Now i want to export that data into excel.
    Thanks & Regards,
    Smith

    Hi,
    Take a look here http://spendolini.blogspot.com/2006/04/custom-export-to-csv.html
    Regards
    Paul

  • Using OBIEE Scheduler to export and save data in excel/pdf

    Hi
    Is it possible to use obiee scheduler and run particular reports and export the data into excel/pdf and save this file at given location on server.
    env: obiee 11g/linux OS
    Thanks for any ideas.

    Hi,
    Yes it is possible.
    As per my knowledge we don't have such option but we can do one way.
    Using IBOTS you can store specific report and specific time in specific location.
    Note : Using JS script.
    Are you going to implement this way send me your mails id will send you js script for doing this.
    Re: Auto SAVE to excel -- Please refer this thread.
    Create js file using the below script and add this js scrif in your ibot advanced tab.
    var FSO = new ActiveXObject("Scripting.FileSystemObject");
    var foldername = 'D:\IBOT'
    if (FSO.FolderExists(foldername))
    var fileName = foldername + "\\" +Parameter(1);
    var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
    else
    FSO.CreateFolder(foldername);
    var fileName = foldername + "D:\IBOT" + Parameter(1);
    var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
    Thanks,
    Satya

  • How export data in Excel From Visual Composer

    Hay everybody,
    I would like to export my data result from Visual Composer to Excel. I've tried with an export data buton, but the exported file has a very bad format in Excel. I've tried an hyperlink buton which contain the Reptname data of the query too, but I can't keep my filters. This second solution can be nice for the format. If anyone knows how I can keep my filters, I would be fine.
    Thanks

    I did not get solution by using BW 3.5 , can we export data to Excel ? I am refering
    [HOW TO EXPORT DATA FROM VISUAL COMPOSER|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123?overridelayout=true] following link??

  • Export data to excel from oracle ?

    Hi,
    Is it possible to export the table data to an excel sheet??? If yes, please let me know how to achieve it !!!
    Regards
    Venkat

    Numerous threads about this issue....
    Just a pair of example...
    Export from oracle to excel
    Export Data to Excel using PL/SQL
    If you were not satisfied ... , you could search extensively the forums:
    http://forums.oracle.com/forums/search.jspa?threadID=&q=export+data+to+excel&objID=f75&dateRange=lastyear&userID=&numResults=15
    Greetings...
    Sim

  • Export Data To Excel From DVWP

    Hi,
    I created DVWP in SPD.
    Is it possible to Export Data To Excel From DVWP?
    What should I do?
    Thanks in advance!

    Hello,
    try this:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c2e2eb0c-202e-49c1-80cb-2fbf5159b10c/how-to-export-dataview-webpart-to-an-excel-file?forum=sharepointcustomizationprevious
    Via script:
    http://ameyakawale.wordpress.com/2011/08/04/exporting-dataview-webpart-data-into-excel-using-javascript/
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/e01ed0bb-63bc-49fc-b1ff-5d2342f897ae/exporting-data-view-webpart-to-excel-spreadsheet?forum=sharepointcustomizationprevious
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Export data to excel from jsf

    How can I export data to excel sheet using jsf ..Any components available..
    Thanks in advance.

    There is no JSF component which does all the task, but there are enough ways to achieve this. You can use a reporting framework, such as JasperReports or BIRT. You can use a Java Excel API, such as Apache POI HSSF or Andy Khan's JExcelAPI. You can write a plain vanilla CSV or HTML TABLE file which can also be read by Excel.

  • Problem in exporting data to excel in nwds 7.3

    Hi All,
    I was using the following code for exporting data to excel in NWDS 7.3
    private IWDCachedWebResource getCachedWebResource(byte[] file, String name,
    WDWebResourceType type) {
    IWDCachedWebResource cachedWebResource = null;
    if (file != null) {
    cachedWebResource = WDWebResource.getWebResource(file, type);
    cachedWebResource.setResourceName(name);
    return cachedWebResource;
    I was getting the error in the following line cachedWebResource = WDWebResource.getWebResource(file, type); when I clicked the quick help it ststed the getWebResource method is depricated.  Kindly provide some assistance on what is the new method in its place.
    Thank you
    Regards,
    Preet Kaur

    Hi Ganesh,
    Thanks that worked fine, but when we go further we are facing problem ie
    byte[] excelXMLFile;
    IWDCachedWebResource cachedExcelResource = null;
    String fileName = dataNode.getNodeInfo().getName() + ".xls";
    try {
    // create Excel 2003 XML data as a byte array for the given context node,
    // attributes and headers
    excelXMLFile = toExcel(dataNode, columnInfos).getBytes("UTF-8");
    // create a cached Web Dynpro XLS resource for the given byte array
    // and filename
    cachedExcelResource = getCachedWebResource(
    excelXMLFile, fileName, WDWebResourceType.XLS);
    // Store URL and file name of cached Excel resource in context.
    if (cachedExcelResource != null) {
    wdContext.currentContextElement().setExcelFileURL(
    cachedExcelResource.getURL());
    wdContext.currentContextElement().setExcelFileName(
    cachedExcelResource.getResourceName());
    // Open popup window with a link to the cached Excel file Web resource.
    openExcelLinkPopup();
    } else {
    wdComponentAPI.getMessageManager().reportException(
    "Failed to create Excel file from table!", true);
    } catch (UnsupportedEncodingException e) {
    wdComponentAPI.getMessageManager().reportException(
    e.getLocalizedMessage(), true);
    } catch (WDURLException e) {
    wdComponentAPI.getMessageManager().reportException(
    e.getLocalizedMessage(), true);
    The above bold lines also would need to be converted to inputstream, but not sure how to correct that
    We are following the below pdf for the implementation.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/edc2f3c2-0401-0010-8898-acd5b6a94353?QuickLink=index&overridelayout=true
    Thank you
    Regards,
    Jaspreet Kaur

  • Export data to Excel

    Hello All,
                I am trying to export data to Excel from a report output. Its a simple report. I have tried the below FM
    CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
    EXPORTING
      DATA_FILENAME             =
      DATA_PATH_FLAG            = 'W'
      DATA_ENVIRONMENT          =
      DATA_TABLE                =
      MACRO_FILENAME            =
      MACRO_PATH_FLAG           = 'E'
      MACRO_ENVIRONMENT         =
      WAIT                      = 'X'
      DELETE_FILE               = 'X'
    EXCEPTIONS
      NO_BATCH                  = 1
      EXCEL_NOT_INSTALLED       = 2
      INTERNAL_ERROR            = 3
      CANCELLED                 = 4
      DOWNLOAD_ERROR            = 5
      NO_AUTHORITY              = 6
      FILE_NOT_DELETED          = 7
      OTHERS                    = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This FM when executed without passing any data is able to open an empty excel sheet but when I try to pass an internal table to DATA_TABLE  its giving a dump. The run time error is CALL_FUNCTION_CONFLICT_TYPE.
    Error:
    **"The function module interface allows you to specify only fields      
    of a particular type under "TABNAME". The field "ITAB1" specified here
    has a different field type."**
    Please let me know if Im missing something.
    Thanks in advance.

    Hi SAP,
    Simply List -> Save -> File -> spreadsheet -> file.xls
    Or check this weblog..
    <a href="/people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel:///people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel
    or
    try this code..
    DATA : file_name TYPE ibipparms-path,
    lc_filename TYPE string.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    IMPORTING
    file_name = file_name .
    lc_filename = file_name.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = lc_filename
    filetype = 'DAT'
    TABLES
    data_tab = gt_itab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Revert back for more help
    Reward points if helpful
    Regards
    Naresh

  • Problem while exporting data to Excel sheet.......

    Hi
    I have written the following code to export data to excel sheet...
    data:
           conv_out TYPE REF TO cl_abap_conv_out_ce,
           content TYPE xstring.
    data : itab_slsrl type table of znslsrlitm.
    data: xml_out TYPE string.
    Data:
    Node_slsrl type ref to If_Wd_Context_Node,
    Elem_slsrl type ref to If_Wd_Context_Element,
    Stru_slsrl type ref to if_wd_context_element .
    call transformation ('ID') source tab = itab_slsrl[] result xml xml_out.
    CALL FUNCTION 'CRM_IC_XML_STRING2XSTRING'
    EXPORTING
    INSTRING = xml_out
    IMPORTING
    OUTXSTRING = content.
    conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
    DATA: lv_filename TYPE string.
    conv_out->convert( exporting data = xml_out IMPORTING buffer = content ).
    cl_wd_runtime_services=>attach_file_to_response(
    i_filename = 'Sales_order_release.xls'
    i_content = content
    i_mime_type = 'application/msexcel'
    i_in_new_window = i_in_new_window
    i_inplace = i_inplace ).
    But when i am trying to export data to excel sheet i am getting
    following error...
    "Switch from current encode to specified encoding is not supported"
    "<?xml version="1.0" encoding='utf-16"?>"
    if i change encoding utf-8 to utf-16 in my code its giving dump..
    "The conversion of certain code pages is not supported"
    Did i miss any step...?
    How to resolve this problem please help me....
    Thanks & Regards
    Sowmya.....

    Hi Sowmya,
    I do had a similar issue, but I avoided that problem temporarily by commenting the following code.
        l_conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8'  ).
    attach the first file
    l_conv_out->convert( exporting data = l_xml_out IMPORTING buffer = l_content  ).
    Once this is done, you can export the data to Excel and open it and see too...But this is a temporary solution only. Implement this solution to get to understand more flaws of this.
    Regards
    Raja Sekhar
    Edited by: Raja Sekhar on Dec 26, 2007 7:51 PM

  • Export data to excel and table column headers

    I noticed that with LV 2012 when I call the method "Export Data to Excel" for a table, the table headers (= column names) are not exported to excel.
    Am I right? I think that the column names should be exported too...
    As a matter of fact when you call the method "Export to simplified image" the column names are included
    How can I export the table column names to excel?
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

    In this document there is a full description of how to export data from LabVIEW to Excel.
    Using a table, the method "Export data to excel" should export the "currently selected data", and data can be programmatically selected using ActiveCell property (as described here).
    With ActiveCell I can select the column headers too (using negative numbers for row and/or column), and I do this.
    And so I expect that when I select "Export data to Excel", the column headers should be exported too (because I selected them!).
    I think that the actual behavior is a bug, rather that an expected behavior.
    Don't you agree?
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

Maybe you are looking for

  • What is the best way to approach making a grid inside a div? Use ul ?

    For example, I'd like to make an evenly spaced set of images on my main content div.  (I don't want to make a table.)  I assume I want to start with  <li> items inside my html?  But in CSS, how do I get them to align evenly from left to right and top

  • Link to anchor question

    Good afternoon all, In my project, I'm trying to link to an anchored location on an external webpage, in this form, "http://www.website.com/page#anchor" Doesnt seem to be working. A quick search returns this, "Text Anchor and Shared Destination hyper

  • Pulling data into IDM via ActiveSync Adapter

    Hello, I am doing a proof of concept on IDM and am trying to import user data from MySQL table into IDM. I wrote an active sync adapter to do this so that whenever a new row is added to the MySQL table, the information is automatically fetched into I

  • Small window preview question

    Hi all, In some graph/diagram drawing applications there is the possibility of showing the whole "diagram" in a small window in a corner even if in the main window only a portion of its is visible. This small window shows also the visible part of the

  • Lync 2010 - Browser Helper & Lync Add-on

    We are rolling out Lync 2010 via SCCM.  One of the things we've noticed is that Lync automatically installs two brower add-ons: Lync 2010 - Browser Helper & Lync Add-on.  Is there any way not to install these?  or at least install them with the defau