Skip to Content

How to zoom and mergedown cells in XML code

I am generating formatted excel file via background Job in SAP and the file will go via email to User as attachment. My requirement is the excel should be set as custom zoom 80 % by default. Can anyone tell how to achieve. I am using IXML method to generate excel in background.

Also When I am doing Merge Down 4 cells then then I am not able to add the next row it gives error.My requirement is to merge all the rows downwards for the Time processing columns. But when I am using MergeDown property mergring is happening correctly but the rows under process column are not inserting and giving error.

merge.png (8.4 kB)
Add a comment
10|10000 characters needed characters exceeded

  • Thanks for your suggestion. Below are my Code snippets similar like xml for zoom but it is not working.

    XML Code:

    <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
    <Zoom>80</Zoom>
    <Selected/>
    <ProtectObjects>False</ProtectObjects>
    <ProtectScenarios>False</ProtectScenarios>
    </WorksheetOptions>
    <ss:WorksheetOptions x:Zoom="80"/>

    ABAP Code

     r_worksheet = l_document->create_simple_element( name = 'Worksheet'  parent = l_element_root ).
      r_worksheet->set_attribute_ns( name = 'Name'  prefix = 'ss'  value = 'Pay Summary' ).
      r_actwindow = l_document->create_simple_element( name = 'WorksheetOptions'  parent = r_worksheet ).
      r_actwindow->set_attribute_ns( name = 'Zoom'  prefix = 'x'  value = '80' ).
  • I know nothing about XML 2003, but it just took me 30 seconds to find the solution to your question. It's just a matter of methodology: create one workbook with nothing inside but zoom 100%, create another one with nothing inside but zoom 80%, save them as XML 2003, compare the two files, and you get the answer. Ask your company to install a file comparator for you, you need one as a developer. You may even use the standard comparator in ABAP, the one which is used for comparing two versions of ABAP source code...

Assigned Tags

Related questions

0 Answers

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.