Skip to Content

ABAP2XLSX. Blank sheets

I download the project form code exchange.

When I run the demo reports all the files are empty.

When I debug the internal tables are filled.

Whe trying to open the file in excel I recieve a message that the file format is wrong.

Any idea what I did wrong.

Thanks

Frances

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on May 26, 2011 at 01:26 PM

    I download the tatest NUGG and activation of all objects.

    All demos are working.

    Thanks for your help.

    One last question. How do I transport all this to the QA and production systems.

    Regards

    Frances

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 25, 2011 at 12:08 PM

    Is your Excel version correct? XLSX is only in Excel 2007 and later, I think.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 25, 2011 at 12:29 PM

    Thanks for your reply.

    My excel version is 2007.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 25, 2011 at 02:11 PM

    I hope this is wat you asked.

    This is the first time I try this.

    I download version 3 of abap2xlsx.

    Application Server AIX6.1 Version 5.

    When I run the demo program ZDEMO_EXCEL I recieve a message

    "0 bytes transfer."

    All the demo files are downloaded in the folder .

    Example: 03_iTab.xlsx

    When I open the file messaga.

    "Excel cannot open the file '03_iTab.xlsx'' because the file format or file extension is no valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."

    We upgrade to office 2007 a year ago. Is there something that needed to change op SAP to convert to office 2007?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 26, 2011 at 06:23 AM

    Sorry.

    We are on ECC 6.0 (EHP3)

    Sapgui 720

    When I debug table lt_test have 109 lines.

    But none in lv_file and lt_file_tab.

    ls_table_settings-table_style = zcl_excel_table=>builtinstyle_medium2.

    ls_table_settings-show_row_stripes = abap_true.

    lo_worksheet->bind_table( ip_table =

    is_table_settings = ls_table_settings ).

    lo_worksheet->freeze_panes( ip_num_rows = 3 ). "freeze column headers when scrolling

    column_dimension = lo_worksheet->get_column_dimension( 'E' ). "make date field a bit wider

    column_dimension->set_width( 11 ).

    CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.

    lv_file = lo_excel_writer->write_file( lo_excel ).

    • Convert to binary

    lt_file_tab = cl_bcs_convert=>xstring_to_solix( iv_xstring = lv_file ).

    lv_bytecount = XSTRLEN( lv_file ).

    Regards

    Frances

    Add a comment
    10|10000 characters needed characters exceeded

    • > lo_worksheet->bind_table( ip_table =

      > is_table_settings = ls_table_settings ).

      Hi Frances,

      It's just a copy and paste error that no data object is assigned to ip_table?

      Could you please try only demo1 that is the simplest demo?

      Is the interface ZIF_EXCEL_WRITER correctly implemented in class ZCL_EXCEL_WRITER_2007, sometimes saplink has problems and you need to import the nugget twice.

      Let us know.

      Regards,

      Ivan

  • Posted on May 26, 2011 at 10:01 AM

    Thanks for all the help.

    Ivan,

    The problem was with interface ZIF_EXCEL_WRITER. I just copy the coding into the method.

    Now only ZDEMO_EXCEL15 gave an error.

    Information on where terminated

    Termination occurred in the ABAP program "ZCL_EXCEL_WRITER_2007==

    in "CREATE_CONTENT_TYPES".

    The main program was "ZDEMO_EXCEL15 ".

    In the source code you have the termination point in line 135

    of the (Include) program "ZCL_EXCEL_WRITER_2007=========CM002".

    The termination is caused because exception "CX_SY_REF_IS_INITIAL

    procedure "CREATE_CONTENT_TYPES" "(METHOD)", but it was neither h

    nor declared

    in the RAISING clause of its signature.

    The procedure is in program "ZCL_EXCEL_WRITER_2007=========CP ";

    code begins in line

    1 of the (Include program "ZCL_EXCEL_WRITER_2007=========CM002 ".

    SOURCE CODE:

    132 lo_element_root->append_child( new_child = lo_element ).

    133

    134 " Worksheet node

    >>>>> lv_worksheets_num = excel->get_worksheets_size( ).

    136 DO lv_worksheets_num TIMES.

    137 lo_element = lo_document->create_simple_element( name = lc_xml_node_ov

    138 parent = lo_document ).

    Regards

    Frances

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.