Moxcel spreadsheet file format (1c)(mxl.rfh):
Class: Database, Status: Almost Complete, Last change: 07.03.2008 10:19:46

type

TSign array[6]of char

data
0 TSign Sign

assert (Sign='MOXCEL');

descr ('Moxcel spreadsheet file format (1c)',NL)
descr ('Info Src: Moxcel (ver. 1.11 beta, 25.03.2004)',NL,
  'Location: http://sourceforge.net/projects/lproject, http://1l.w4b.ru/',NL,
  '      Copyright (c) 2004 Dmitry Pavluk <dmp@myrealbox.com>, Evgeny Pivnev <eugene@spb.rosgazservice.com>.',NL)


type

TMXLHdr struc
  Word w06 //Always 6
  long MaxCol
  long MaxRow
  long ObjCnt
ends

data
0x0b TMXLHdr MXLHdr

type

TCellFlags0 set 8 of (
  FontNameUsed ^ 0x01, //+ - L ( )
  FontSizeUsed ^ 0x02, //+ -  ( )
  FontBold ^ 0x04, //+ - v ()
  FontItalic ^ 0x08, //+ - =v ()
  FontUnderline ^0x10, //+ - v ()
  LeftEdge ^ 0x20, // - T ()
  TopEdge ^ 0x40, // - T ()
  RightEdge ^ 0x80  // -  ()
)

TCellFlags1 set 8 of (
  BottomEdge ^ 0x01, // - = ()
  EdgeColorUsed ^ 0x02, //  ( )
  Flag1 ^ 0x04, //L   1 (.   -)
  Flag2 ^ 0x08, //L   2 (.   -)
  Hor ^ 0x10, //  ()| vv  ()
  Vert ^ 0x20, //  ()
  FontColorUsed ^ 0x40, //  ( )
  BackGroundUsed ^ 0x80  //L ( )
)

TCellFlags2 set 8 of (
  PatternUsed ^ 0x01, //L ( )
  PatternColorUsed ^ 0x02, //  ( )
  Checked ^ 0x04, // ()
  Type_ ^ 0x08, //T ()
  Protection ^ 0x10,  // () 
  IsDialog ^ 0x20 //- 
)

TCellFlags3 set 8 of (
  DescrUsed ^ 0x40, // ( > 0)
  TextUsed ^ 0x80  //T ( > 0)
)

TFontBold enum byte (
  Off = 4, //+ - v = 0
  On = 7 //+ - v = 1
)
 
TFontItalic enum byte (
  Off = 0, //+ - =v = 0
  On = 1 //+ - =v = 1
)
 
TFontUnderline enum byte (
  Off = 0, //+ - v = 0
  On = 1 //+ - v = 1 
)

TTextRec0 struc
  byte L0
  case @.L0 of
    255: word
  endc L1
  array[@.L0 when (@.L0<>255) exc @.L1.255]of Char S
ends

TTextRec(Present) case @:Present of
  0x0: void
else TTextRec0
endc

TDlgCellType enum byte (
 Calc = 0x41, // T 
 Lookup = 0x42, // T
 Cal = 0x43, // 
 Date = 0x44, // -
 Enum = 0x45, // 
 Sub = 0x4b, // T 
 Num = 0x4e, // +
 Doc = 0x4f, // -
 Plan = 0x50, //  
 Str = 0x53, // T
 Account = 0x54, // T
 Undef = 0x55  // =v
)

TDialogAddInf0 struc
  word L0
  word W0 //=0
  word W3 //=3 ? .  , 
  TDlgCellType Type_ //T
  long Len //- (,   . .)
  long Prec //T ()
  long hKind //? =  , , ,  ..
  byte IsUnsigned //=v=1 ()
  byte Split3 // v=1 ()
  TTextRec0 InternalVal //? T 
  TTextRec0 Fmt //L
  byte IsNull //? (  . )
  byte X
  byte HasButton // v=1
  byte X1
  byte Disabled //T v=1
  byte ReadOnly // =1
  byte /*TTextRec0 -   */ Mask //
  raw[] rest
ends:[@:Size=@.L0+2]

TDialogAddInf(Present) case @:Present of
  0x0: void
else TDialogAddInf0
endc

type bit

TBit4 num+(4)

THorAlign enum TBit4 (
  Left = 0, //  = T
  Right = 2, //  = 
  Width = 4, //  =  
  Center = 6 //  = 
)

TSelCol set 4 of (
  SelCol ^ 0x2 // vv 
)

THorAlignSelCol struc
  THorAlign Al
  TSelCol F
ends

type

TVertAlign enum byte (
  Top=0, //  = T
  Bottom=0x08, //  = =
  Center=0x18 //  = 
)


TFillPattern byte

TFrameStyle byte

TPalColor byte

TCheckStyle enum byte (
  Auto = 0, //L
  Cut = 1, //+
  Fill = 2, //
  Shift = 3, //
  Red = 4, //v
  FillRed = 5 // + v
)

TCellType enum byte (
  cText=0, //T
  cExpr=1, //Tv
  cTempl=2, //+
  cFixTempl=3 //L. 
)

TCellCommon struc
  TCellFlags0 F0
  TCellFlags1 F1
  TCellFlags2 F2
  TCellFlags3 F3
  word V1 //   1 (.   -)
  word V2 //   2 (.   -)
  word hFont //= L , Deft = Arial (  )
  word FontSize //=-4*@
  TFontBold FontBold
  TFontItalic FontItalic
  TFontUnderline FontUnderline
  THorAlignSelCol AlHor // ,  vv 
  TVertAlign AlVert // 
  TFillPattern hPattern //L = = 
  TFrameStyle LeftFrame // - T = =  
  TFrameStyle TopFrame // - T = =  
  TFrameStyle RightFrame // -  = =  
  TFrameStyle BottomFrame // - = = =  
  TPalColor PatternColor //  = = 
  TPalColor FrameColor //  = = 
  TPalColor FontColor //  = = 
  TPalColor BgColor //L = = 
  TCheckStyle CheckStyle //
  TCellType Type_ //T
  byte NotProtected // = 0, . . !
  byte X //?
  TTextRec(@.F3 and TCellFlags3.TextUsed) Text
  TTextRec(@.F3 and TCellFlags3.DescrUsed) Descr
  TDialogAddInf(@.F2 and TCellFlags2.IsDialog) Dialog
ends

TFntInf raw[60] //Temp.

TFontTbl struc
  word Cnt
  array[@.Cnt] of Long hFnt // 
  word ValCnt
  array[@.ValCnt] of TFntInf FntInf //- 
  ulong X //(?)
ends

TColCellPropTbl struc
  word Cnt
  array[@.Cnt] of Long h // 
  word ValCnt
  array[@.ValCnt] of TCellCommon CellProp //-   .
ends

TRowProp struc
  TCellCommon RowCell
  TColCellPropTbl Cells
ends

TRowCellPropTbl struc
  word Cnt
  array[@.Cnt] of Long h // 
  word ValCnt
  array[@.ValCnt] of TRowProp RowProp //-   .
ends

TPicKind enum long (
  Line=1, //T
  Rect=2, //
  Text=3, //T
  OLE=4,  //OLE, -
  Image=5 //
)

TPicProp struc
  TCellCommon Cell
  TPicKind Kind
  long Col0//=    
  long Row0//=    
  long dX0//T X        ? 
  long dY0//T Y        ? 
  long Col1//=   
  long Row1//=    
  long dX1//T X        ?
  long dY1//T Y        ? 
  long ZOrder//L  (?),     ,  
  case @.Kind of
   Image: struc
     ulong Sign //? = "lt\x00\x00"= 0x0000746c 
     ulong Size
     raw[@.Size] Dat
    ends
   OLE: struc
     word RecKind //0xffff - + "  OLE" (?), 0x8001 - =
     case @.RecKind of
      0xffff: struc
        word Z //=0
        word L //-  OLE ( 0x0e)
        array[@.L]of Char Name //T OLE ( "CSheetCntrItem")
       ends
     endc ClassNameInf
     ulong d0x100 //? = 256
     long Num //v   (?),  .  .   2  3
     ulong Kind //1 -  OLE, 0x0012f150 -  "-v"
     word W0  //=0
     ulong D1 //=1
     ulong Size //- OLE 
     raw[@.Size] Dat
    ends
  endc AddInf
ends

TPicPropTbl struc
  word Cnt
  array[@.Cnt] of TPicProp Tbl
ends

TCellRect struc
  long Col0 //=   
  long Row0 //=   
  long Col1 //=   
  long Row1 //=   
ends

TUnionPropTbl struc
  word Cnt
  array[@.Cnt] of TCellRect Tbl
ends

TSecProp struc
  long N0 //=  /
  long N1 //=  / 
  long hParGr //T    =   v, Deft=0
  TTextRec0 Name //L  
ends

TSecPropTbl struc
  word Cnt
  array[@.Cnt] of TSecProp Tbl
ends

TPgSplitTbl struc
  word Cnt
  array[@.Cnt] of long Tbl // / 
ends

TNameProp struc
  TTextRec0 Name //L
  ulong D1 //=1
  ulong DX //=0x0012f9e8 (?)
  ulong D3 //=3
  TCellRect R //
ends 

TNamePropTbl struc
  long Cnt
  array[@.Cnt] of TNameProp Tbl
ends



TMXLData struc
  TCellCommon TblCell //-    v
  TFontTbl FontTbl
  TCellCommon PgTitleTop // 
  TCellCommon PgTitleBottom // 
  TColCellPropTbl ColCells //-   
  TRowCellPropTbl RowCells //-   
  TPicPropTbl Pics // v
  TUnionPropTbl Unions //
  TSecPropTbl VertSecs // v
  TSecPropTbl HorSecs // v
  TPgSplitTbl VertSplits //v  v
  TPgSplitTbl HorSplits //v  v
  TNamePropTbl CellNames //
ends

data
0x0b+MXLHdr:size; TMXLData MXLData


Other specifications.


FlexT home page, Author`s home page.