Link Search Menu Expand Document

Data types

For MS Excel data types could be crucial, since most of the formulas depends on cell’s type. In ZCL_XTT_REPLACE_BLOCK attributes you can find the following declaretions.

Basic data types

TypeDescription
integerTemplate format (int4, int8, b, s)
doubleTemplate format (p, f, decfloat16, decfloat34)
dateTemplate format (d)
timeTemplate format (t)
stringTemplate format (string)
datetimeVirtual type (DATE + TIME)
booleanFor Excel logical functions (TRUE or FALSE)
maskUse WRITE TO
as_isDo not escape XML symbols (can contain special chars <>&’..)
imageMore about pictures here
blockMore about conditional blocks here

The first 4 data types detected implicitly. But for the boolean and datetime you have to specify type explicitly.

As you could see ;type=mask addition can be used for material numbers to delete leading zeros and for the WBS elements use custom pattern for proper visualisation.


For line breaks, you can use cl_abap_char_utilities=>cr_lf the appropriate separator will be inserted automatically

ClassPage SeparatorLine Separator
ZCL_XTT_EXCEL_XLSX-cl_abap_char_utilities=>cr_lf
ZCL_XTT_EXCEL_XML-&#10;
ZCL_XTT_WORD_DOCX & ZCL_XTT_WORD_XML<w:br w:type=”page”/><w:br/>
ZCL_XTT_PDF<breakAfter targetType=”pageArea”/>cl_abap_char_utilities=>cr_lf
ZCL_XTT_HTML-<br/>

There are also defined several constants which detects what kind of data you pass to merge method.

  • ‘struct’
  • ‘object’
  • ‘table’
  • ‘tree’

As you can notice so far we passed only structures and tables to merge method. But also we can pass objets (they work exactly as structures) & and trees (for hierarchical output).


If you have in Excel

They would be ‘streched’ after data pasting in ZCL_XTT_EXCEL_XLSX class.

In ZCL_XTT_EXCEL_XML only formulas & merged cells would be proccessed correctly
Since relative references are used in the internal XML (unlike xlsx), there is no need in $ sign.