<Grid>
   <Cfg id="AutoTree" SuppressCfg="1" Sorting="0" Size="Low"/> <!-- Suppresses configuration and sorting -->
   <Cfg SuppressMessage="3"/> <!-- Suppresses all messages, including page messages -->

   <!-- Defines automatic row pages -->
   <Cfg Paging="2"/> <!-- Turns on client paging for rows, required for AutoPages -->
   <Cfg AutoPages="1"/> <!-- Automatically adds new rows after scrolling to bottom -->
   <Cfg PageLength="10"/> <!-- The rows are added by 10 in the step -->
   <Cfg MaxPages="3"/> <!-- Removes unused row pages, renders maximally 3 pages -->
   <Cfg RemoveUnusedFixed="0"/> <!-- Shows always the left side row index and panel -->
   <Cfg RemoveAutoPages="1"/> <!-- Automatically removes all unused pages at the grid end -->
   <Pager Visible="0"/> <!-- Hides the side pager that is shown for paging by default -->

   <!-- Defines automatic column pages -->
   <Cfg ColPaging="2"/> <!-- Turns on client paging for columns, required for AutoColPages -->
   <Cfg AutoColPages="1"/> <!-- Automatically adds new columns after scrolling to left-->
   <Cfg ColPageLength="10"/> <!-- The columns are added by 10 in the step -->
   <Cfg ColPageMin="0"/> <!-- Does not render any column on start outside the column pages -->
   <Cfg MaxColPages="3"/> <!-- Removes unused column pages, renders maximally 3 pages -->
   <Cfg ColPagingFixed="0"/> <!-- Shows always the top column header and panel -->
   <Cfg RemoveAutoColPages="1"/> <!-- Automatically removes all unused column pages at the grid end -->

   <!-- Defines row and column indexes -->
   <Cfg RowIndex="Index" RowIndexType="46"/> <!-- Creates number RowIndex with all data rows except deleted -->
   <Cfg ColIndex="Header" ColIndexType="30" ColIndexChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/> <!-- Creates letter ColIndex with all data columns except deleted  -->

   <!-- Defines column tree -->
   <Cfg ColTree="3"/> <!-- Permits column tree and shows parents on the left side -->
   <Cfg MaxColLevel="10"/> <!-- Maximal value of column Level -->

   <!-- Defines row tree -->
   <Cfg MainCol="Index"/> <!-- Show the row tree in the Index column -->
   <Cfg HideEmptyTree="1"/> <!-- Hides the root tree if there are only root rows -->
   <Cfg AutoTreeWidth="40"/> <!-- Sets automatic width of the main column and sets width of its text part-->
   <Header IndexLevels="1"/> <!-- Show the level buttons for the Index column in the main header -->
   <Cfg IndentType="2"/> <!-- Preserves row position when indent / outdent and places it rather to different parent and forces the intent / outdent -->
   <Cfg HideTree="0"/> <!-- Shows row tree -->

   <!--- Formula editing -->
   <Cfg FormulaEditing="1"/> <!-- Permits formula editing; Uploads the formula in the cell value, not in EFormula attribute -->
   <Cfg FormulaChanges="0"/> <!-- Does not mark values calculated by formula as Changed -->
   <Cfg FormulaType="0"/> <!-- Does not calculate deleted, filtered and hidden rows and columns -->
   <Cfg DragEdit="2" /> <!-- Permits dragging during editing to choose cell ranges in formula -->
   <Cfg FormulaRelative="1"/> <!-- Cell references can be absolute or relative. Cell references in formulas in data xml in/out are in standard notation -->
   <Cfg FormulaLocal="0"/> <!-- Formula names in xml in/out are not localized English format -->
   <Cfg FormulaResults="31"/> <!-- Cells with error formulas are marked red and error message is shown; the formula results are checked against cell restrictions; the null and NaN results are not permitted  -->
   <Cfg FormulaCircular="6"/> <!-- Circular cell references in formulas are restricted with error message -->
   <Cfg EditErrorsMessageTime="1000"/> <!-- How long the formula and edit error message will be shown -->
   <Cfg FormulaAddParenthesis="1"/> <!-- Tries to adds ')' to the end of formula when editing resulted to incorrect formula -->
   <Cfg CalculateColumns="1"/> <!-- Recalculates sheet also after any column manipulation except resizing -->
   <Cfg NoExportFunc="getcollevel,getrowlevel,calccnt"/> <!-- Custom functions that cannot be exported to xlsx, listed are function names used in EFormula -->
   <Cfg MinMidWidth="200"/> <!-- Minimal size for narrow mobile displays -->
   <DefCols> <D Name="Auto" FormulaSuggest="6"/> </DefCols>  <!-- For every column generates suggest list of all available formula functions to use in formula editing -->
   <Actions OnDragHeader="ChooseColsReplaceAll OR ColMoveSelected OR ColMove" OnCtrlDragHeader="ChooseColsInsert OR ColCopySelected OR ColCopy"/> <!-- Dragging header during formula edit will choose the columns to the range -->
   <Lang>
      <FormulaFunctions getcollevel="getcollevel" getrowlevel="getrowlevel" calccnt="calccnt"/> <!-- custom function defined in html script. The name is the JavaScript function name, the value is function name usable in sheet -->
   </Lang> 

   <!-- Cell popup menu to manipulate rows and columns -->
   <Cfg Menu="{Head:'Actions',Items:[
         {Name:'Rows',Caption:1},
         {Name:'Select',Menu:1,Items:'|SelectRow|DeselectRow|SelectFocusedRows|DeselectFocusedRows|-|SelectAll|DeselectAll|InvertAll'},
         {Name:'Show',Menu:1,Items:'|ShowRowAbove|ShowRowBelow|ShowRows|ShowRowsW'},
         {Name:'Hide',Menu:1,Items:'|HideRows'},
         {Name:'Add',Menu:1,Items:'|AddRow|AddRows@2|-|CopyRow|CopyRows|CopySelected'},
         {Name:'Delete',Menu:1,Items:'|DeleteRows|UndeleteRows|RemoveRows'},
         {Name:'Tree',Menu:1,Items:'|Indent|Outdent'},
         {Name:'-'},
         {Name:'Columns',Caption:1},
         {Name:'Select',Menu:1,Items:'|SelectCol|DeselectCol|SelectFocusedCols|DeselectFocusedCols|-|SelectAllCols|DeselectAllCols'},
         {Name:'Show',Menu:1,Items:'|ShowColLeft|ShowColRight|ShowCols|ShowColsW'},
         {Name:'Hide',Menu:1,Items:'|HideCols'},
         {Name:'Add',Menu:1,Items:'|AddCol|AddCols@2|-|CopyCol|CopyCols|CopySelectedCols'},
         {Name:'Delete',Menu:1,Items:'|DeleteCols|UndeleteCols|RemoveCols'},
         {Name:'Tree',Menu:1,Items:'|IndentColsForce|OutdentColsForce'},
      ]}"/>

   <!-- Other settings often set in the sheets -->
   <Cfg SelectAllType="31"/> <!-- The SelectAll button on panels is a switch; it is changed also when the row/column is selected/unselected; the added rows/columns are automatically selected if it is on -->
   <Cfg ColAdding="1" ColDeleting="1" SelectingCols="1"/> <!-- Permits column manipulating; shows the buttons on column panel -->
   <Cfg Undo="79"/> <!-- Permits undoing all actions, including scroll -->
   <Cfg EnterMode="1"/> <!-- Enter moves cursor down -->
   <Cfg FocusRect="5"/> <!-- Permits focusing cell range and hides focused cursor for the whole row. Does not show the corner and does not move and copy the focused range by dragging. -->
   <Cfg CopyCols="0" PasteCols="5" PasteFocused="11" ExcludeClear="1"/> <!-- Copy & paste focused cells instead of rows -->
   <Cfg DynamicSpan="2"/> <!-- Permits spanning cells dynamically -->
   <Panel Copy="1"/> <!-- Show add button in row panel -->
   <Header Index=" " Align="Center"/> <!-- Centers all cells in header -->
   <Def>
      <D Name="ColTree" IndexButton="Level" IndexHoverCell=""/> <!-- Show the button to expand given column level -->
   </Def>
   <DefCols>
      <D Name="Auto" Type="Auto"/>
   </DefCols>
   <Head>
      <Panel Index="ColSelectAll,ColDeleteAll,ColCopyAll"/>  <!-- Adds panel for columns -->
   </Head>

   <!-- Fixed columns -->
   <LeftCols>
      <C Name="Index" Align="Center" Def="Index"/>
      <C Name="Panel"/>
      <C Name="A" Def="Auto"/>
      <C Name="B" Def="Auto"/>
   </LeftCols>

   <!-- Columns with tree -->
   <Cols>
      <C Name="C" Def="Auto"/>
      <C Name="D" Def="Auto" Level="1"/>
      <C Name="E" Def="Auto" Level="1"/>
      <C Name="F" Def="Auto" Level="2"/>
      <C Name="G" Def="Auto" Level="3"/>
      <C Name="H" Def="Auto" Level="3"/>
      <C Name="I" Def="Auto" Level="1"/>
      <C Name="J" Def="Auto" Level="1"/>
      <C Name="K" Def="Auto" Level="2"/>
      <C Name="L" Def="Auto" Level="2"/>
      <C Name="M" Def="Auto" Level="2"/>
      <C Name="N" Def="Auto" Level="1"/>
      <C Name="O" Def="Auto"/>
      <C Name="P" Def="Auto"/>
      <C Name="Q" Def="Auto" Level="1"/>
      <C Name="R" Def="Auto" Level="1"/>
      <C Name="S" Def="Auto" Level="2"/>
      <C Name="T" Def="Auto" Level="3"/>
      <C Name="U" Def="Auto" Level="2"/>
      <C Name="V" Def="Auto" Level="1"/>
      <C Name="W" Def="Auto" Level="2"/>
      <C Name="X" Def="Auto" Level="2"/>
      <C Name="Y" Def="Auto" Level="3" Visible="0"/>
      <C Name="Z" Def="Auto" Level="3" Visible="0"/>
      <C Name="AA" Def="Auto" Level="2"/>
      <C Name="AB" Def="Auto" Level="1"/>
      <C Name="AC" Def="Auto" Level="2"/>
      <C Name="AD" Def="Auto" Level="1"/>
   </Cols>

   <!-- Fixed rows -->
   <Head>
      <I A="=calccnt()" B="Fixed" C="C" D="D" E="E" F="F" G="G" H="H" I="I" J="J" K="K" L="L" M="M" N="N" O="O" P="P" Q="Q" R="R" S="S" T="T" U="U" V="V" W="W" X="X" Y="Y" Z="Z" AA="AA" AB="AB" AC="AC" AD="AD"/>
      <I A="Fixed" B="Level"
         C="=getcollevel()" D="=getcollevel()" E="=getcollevel()" F="=getcollevel()" G="=getcollevel()" H="=getcollevel()" I="=getcollevel()" J="=getcollevel()" K="=getcollevel()" L="=getcollevel()"
         M="=getcollevel()" N="=getcollevel()" O="=getcollevel()" P="=getcollevel()" Q="=getcollevel()" R="=getcollevel()" S="=getcollevel()" T="=getcollevel()" U="=getcollevel()" V="=getcollevel()"
         W="=getcollevel()" X="=getcollevel()" Y="=getcollevel()" Z="=getcollevel()" AA="=getcollevel()" AB="=getcollevel()" AC="=getcollevel()" AD="=getcollevel()"/>
   </Head>
   <Body>
      <B>
         <I A="3" B="=getrowlevel()"/>
         <I A="4" B="=getrowlevel()" Level="1"/>
         <I A="5" B="=getrowlevel()" Level="1" FRowSpan="8" FSpan="8"/>
         <I A="6" B="=getrowlevel()" Level="2"/>
         <I A="7" B="=getrowlevel()" Level="3"/>
         <I A="8" B="=getrowlevel()" Level="2" Expanded="0"/>
         <I A="9" B="=getrowlevel()" Level="3"/>
         <I A="10" B="=getrowlevel()" Level="3"/>
         <I A="11" B="=getrowlevel()" Level="2"/>
         <I A="12" B="=getrowlevel()" Level="1"/>
         <I A="13" B="=getrowlevel()" Level="1"/>
         <I A="14" B="=getrowlevel()"/>
         <I A="15" B="=getrowlevel()"/>
         <I A="16" B="=getrowlevel()" Level="1"/>
         <I A="17" B="=getrowlevel()" Level="2"/>
         <I A="18" B="=getrowlevel()" Level="2"/>
         <I A="19" B="=getrowlevel()" Level="1"/>
         <I A="20" B="=getrowlevel()" Level="2"/>
         <I A="21" B="=getrowlevel()" Level="3"/>
         <I A="22" B="=getrowlevel()" Level="4"/>
         <I A="23" B="=getrowlevel()" Level="4"/>
         <I A="24" B="=getrowlevel()" Level="5"/>
         <I A="25" B="=getrowlevel()"/>
         <I A="26" B="=getrowlevel()" Level="1"/>
         <I A="27" B="=getrowlevel()" Level="2"/>
         <I A="28" B="=getrowlevel()" Level="1"/>
         <I A="29" B="=getrowlevel()" Level="2"/>
         <I A="30" B="=getrowlevel()" Level="3"/>
         <I A="31" B="=getrowlevel()" Level="2"/>
         <I A="32" B="=getrowlevel()" Level="3"/>
      </B>
   </Body>
</Grid>