diff -rup sc/inc/dpobject.hxx sc/inc/dpobject.hxx
--- sc/inc/dpobject.hxx	2006-10-30 10:45:07.000000000 -0500
+++ sc/inc/dpobject.hxx	2006-11-01 12:09:52.000000000 -0500
@@ -119,7 +119,8 @@ private:
 	ScDPOutput*				pOutput;
 	BOOL					bSettingsChanged;
 	BOOL					bAlive;			// FALSE if only used to hold settings
-	USHORT                                  nAutoFormatIndex;
+	USHORT                  nAutoFormatIndex;
+	BOOL 			        bHeaderLayout;	// TRUE : grid, FALSE : standard
 	BOOL					bAllowMove;
 	BOOL					bInfoValid;		// affects: nHeaderRows
 	long					nHeaderRows;	// page fields plus filter button
@@ -153,6 +154,9 @@ public:
 	void 			SetAutoFormatIndex (const USHORT nIndex);
 	const USHORT		GetAutoFormatIndex ()	{ if (this == NULL) return 65535; else return nAutoFormatIndex; }
 
+	void 			    SetHeaderLayout (BOOL bUseGrid);
+	BOOL			    GetHeaderLayout ()	const { return bHeaderLayout; }
+
 	void				SetSheetDesc(const ScSheetSourceDesc& rDesc);
 	void				SetImportDesc(const ScImportSourceDesc& rDesc);
 	void				SetServiceData(const ScDPServiceDesc& rDesc);
diff -rup sc/inc/dpoutput.hxx sc/inc/dpoutput.hxx
--- sc/inc/dpoutput.hxx	2006-10-30 10:45:07.000000000 -0500
+++ sc/inc/dpoutput.hxx	2006-11-01 12:10:01.000000000 -0500
@@ -123,6 +123,7 @@ private:
 	long					nColCount;
 	long					nRowCount;
 	long					nHeaderSize;
+	BOOL 			        bHeaderLayout;	// TRUE : grid, FALSE : standard
 	SCCOL					nTabStartCol;
 	SCROW					nTabStartRow;
 	SCCOL					nMemberStartCol;
@@ -165,6 +166,9 @@ public:
 	BOOL			IsFilterButton( const ScAddress& rPos );
 
     void            GetMemberResultNames( StrCollection& rNames, long nDimension );
+
+	void 			SetHeaderLayout (BOOL bUseGrid);
+	BOOL			GetHeaderLayout () const 	{ return bHeaderLayout; }
 
     static void     GetDataDimensionNames( String& rSourceName, String& rGivenName,
                                            const com::sun::star::uno::Reference<
diff -rup sc/source/core/data/dpobject.cxx sc/source/core/data/dpobject.cxx
--- sc/source/core/data/dpobject.cxx	2006-10-30 10:45:07.000000000 -0500
+++ sc/source/core/data/dpobject.cxx	2006-11-01 11:02:16.000000000 -0500
@@ -156,6 +156,7 @@ ScDPObject::ScDPObject( ScDocument* pD )
 	pServDesc( NULL ),
 	pOutput( NULL ),
 	nAutoFormatIndex( 65535 ),
+	bHeaderLayout( FALSE ),
 	bSettingsChanged( FALSE ),
 	bAlive( FALSE ),
 	bAllowMove( FALSE ),
@@ -171,6 +172,7 @@ ScDPObject::ScDPObject(const ScDPObject&
 	aTableTag( r.aTableTag ),
 	aOutRange( r.aOutRange ),
 	nAutoFormatIndex( r.nAutoFormatIndex ),
+	bHeaderLayout( r.bHeaderLayout ),
 	pSheetDesc( NULL ),
 	pImpDesc( NULL ),
 	pServDesc( NULL ),
@@ -228,6 +230,11 @@ void ScDPObject::SetAutoFormatIndex(cons
 	nAutoFormatIndex	= nIndex;
 }
 
+void ScDPObject::SetHeaderLayout (BOOL bUseGrid)
+{
+	bHeaderLayout = bUseGrid;
+}
+
 void ScDPObject::SetOutRange(const ScRange& rRange)
 {
 	aOutRange = rRange;
@@ -335,6 +342,7 @@ void ScDPObject::CreateOutput()
 	{
         BOOL bFilterButton = IsSheetData() && pSaveData && pSaveData->GetFilterButton();
         pOutput = new ScDPOutput( pDoc, xSource, aOutRange.aStart, bFilterButton );
+		pOutput->SetHeaderLayout ( bHeaderLayout );
 
 		long nOldRows = nHeaderRows;
 		nHeaderRows = pOutput->GetHeaderRows();
diff -rup sc/source/core/data/dpoutput.cxx sc/source/core/data/dpoutput.cxx
--- sc/source/core/data/dpoutput.cxx	2006-10-30 10:45:07.000000000 -0500
+++ sc/source/core/data/dpoutput.cxx	2006-11-01 10:11:45.000000000 -0500
@@ -362,6 +362,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, 
 	nColFmtCount( 0 ),
 	nRowFmtCount( 0 ),
     nSingleNumFmt( 0 ),
+	bHeaderLayout( FALSE ),
 	bSizesValid( FALSE ),
 	bSizeOverflow( FALSE )
 {
@@ -652,7 +653,8 @@ void ScDPOutput::CalcSizes()
 		nRowCount = aData.getLength();
 		const uno::Sequence<sheet::DataResult>* pRowAry = aData.getConstArray();
 		nColCount = nRowCount ? ( pRowAry[0].getLength() ) : 0;
-		nHeaderSize = 1;			// one row for field names
+
+		nHeaderSize = GetHeaderLayout () ? 2 : 1;
 
 		//	calculate output positions and sizes
 
@@ -918,6 +920,12 @@ void ScDPOutput::GetMemberResultNames( S
     }
 }
 
+void ScDPOutput::SetHeaderLayout (BOOL bLayout)
+{
+	bHeaderLayout = bLayout;
+	bSizesValid = FALSE;
+}
+
 //
 //		Methods to find specific parts of the table
 //
diff -rup sc/source/filter/excel/read.cxx sc/source/filter/excel/read.cxx
--- sc/source/filter/excel/read.cxx	2006-10-30 15:28:16.000000000 -0500
+++ sc/source/filter/excel/read.cxx	2006-10-30 17:32:24.000000000 -0500
@@ -1200,6 +1200,7 @@ FltError ImportExcel8::Read( void )
                     case EXC_ID_SXDI:           rPTableMgr.ReadSxdi( maStrm );      break;
                     case EXC_ID_SXVDEX:         rPTableMgr.ReadSxvdex( maStrm );    break;
                     case EXC_ID_SXEX:           rPTableMgr.ReadSxex( maStrm );      break;
+                    case EXC_ID_SX_AUTOFORMAT:  rPTableMgr.ReadSxAutoformat( maStrm ); break;
                 }
 			}
             break;
diff -rup sc/source/filter/excel/xepivot.cxx sc/source/filter/excel/xepivot.cxx
--- sc/source/filter/excel/xepivot.cxx	2006-10-30 10:45:07.000000000 -0500
+++ sc/source/filter/excel/xepivot.cxx	2006-11-02 09:47:08.000000000 -0500
@@ -1260,6 +1260,8 @@ XclExpPivotTable::XclExpPivotTable( cons
         maPTInfo.maDataName = ScGlobal::GetRscString( STR_PIVOT_DATA );
         maPTInfo.mnCacheIdx = mrPCache.GetCacheIndex();
 
+		maPTAutoFormat.Init( rDPObj );
+
         if( const ScDPSaveData* pSaveData = rDPObj.GetSaveData() )
         {
             // additional properties from ScDPSaveData
@@ -1339,6 +1341,8 @@ void XclExpPivotTable::Save( XclExpStrea
         WriteSxli( rStrm, maPTInfo.mnDataCols, maPTInfo.mnColFields );
         // SXEX
         WriteSxex( rStrm );
+		// SX_AUTOFORMAT
+		WriteSxAutoformat( rStrm );
     }
 }
 
@@ -1478,6 +1482,8 @@ void XclExpPivotTable::Finalize()
     rnDataXclRow = rnXclRow1 + maPTInfo.mnColFields + 1;
     if( maDataFields.empty() )
         ++rnDataXclRow;
+    if( 0 == maPTAutoFormat.mbGridLayout )
+        ++rnDataXclRow;
     rnXclCol2 = ::std::max( rnXclCol2, rnDataXclCol );
     rnXclRow2 = ::std::max( rnXclRow2, rnDataXclRow );
     maPTInfo.mnDataCols = rnXclCol2 - rnDataXclCol + 1;
@@ -1485,6 +1491,8 @@ void XclExpPivotTable::Finalize()
 
     // first heading
     maPTInfo.mnFirstHeadRow = rnXclRow1 + 1;
+    if( 0 == maPTAutoFormat.mbGridLayout )
+		maPTInfo.mnFirstHeadRow++;
 }
 
 // records ----------------------------------------------------------------
@@ -1560,6 +1568,18 @@ void XclExpPivotTable::WriteSxex( XclExp
     rStrm.EndRecord();
 }
 
+void XclExpPivotTable::WriteSxAutoformat( XclExpStream& rStrm ) const
+{
+	// Until we sync the autoformat ids only export if using grid header layout
+	// That could only have been set via xls import so far.
+	if( 0 == maPTAutoFormat.mbGridLayout )
+	{
+		rStrm.StartRecord( EXC_ID_SX_AUTOFORMAT, 17 );
+		rStrm << maPTAutoFormat;
+		rStrm.EndRecord();
+	}
+}
+
 // ============================================================================
 
 namespace {
diff -rup sc/source/filter/excel/xipivot.cxx sc/source/filter/excel/xipivot.cxx
--- sc/source/filter/excel/xipivot.cxx	2007-02-27 13:27:43.000000000 +0100
+++ sc/source/filter/excel/xipivot.cxx	2007-11-14 17:15:40.000000000 +0100
@@ -1340,6 +1340,11 @@ void XclImpPivotTable::ReadSxex( XclImpS
     rStrm >> maPTExtInfo;
 }
 
+void XclImpPivotTable::ReadSxAutoformat( XclImpStream& rStrm )
+{
+    rStrm >> maPTAutoFormat;
+}
+
 // ----------------------------------------------------------------------------
 
 void XclImpPivotTable::Convert()
@@ -1407,6 +1412,7 @@ void XclImpPivotTable::Convert()
     pDPObj->SetSheetDesc( aDesc );
     pDPObj->SetOutRange( aOutRange );
     pDPObj->SetAlive( TRUE );
+	pDPObj->SetHeaderLayout( maPTAutoFormat.mbGridLayout == 0 );
     GetDoc().GetDPCollection()->Insert( pDPObj );
 }
 
@@ -1502,6 +1508,12 @@ void XclImpPivotTableManager::ReadSxex( 
         maPTables.back()->ReadSxex( rStrm );
 }
 
+void XclImpPivotTableManager::ReadSxAutoformat( XclImpStream& rStrm )
+{
+    if( !maPTables.empty() )
+        maPTables.back()->ReadSxAutoformat( rStrm );
+}
+
 // ----------------------------------------------------------------------------
 
 void XclImpPivotTableManager::ReadPivotCaches( XclImpStream& rStrm )
@@ -1518,3 +1530,79 @@ void XclImpPivotTableManager::ConvertPiv
 
 // ============================================================================
 
+// Pivot table autoformat settings ============================================
+
+/**
+classic		: 10 08 00 00 00 00 00 00 20 00 00 00 01 00 00 00 00
+default		: 10 08 00 00 00 00 00 00 20 00 00 00 01 00 00 00 00
+report01	: 10 08 02 00 00 00 00 00 20 00 00 00 00 10 00 00 00
+report02	: 10 08 02 00 00 00 00 00 20 00 00 00 01 10 00 00 00
+report03	: 10 08 02 00 00 00 00 00 20 00 00 00 02 10 00 00 00
+report04	: 10 08 02 00 00 00 00 00 20 00 00 00 03 10 00 00 00
+report05	: 10 08 02 00 00 00 00 00 20 00 00 00 04 10 00 00 00
+report06	: 10 08 02 00 00 00 00 00 20 00 00 00 05 10 00 00 00
+report07	: 10 08 02 00 00 00 00 00 20 00 00 00 06 10 00 00 00
+report08	: 10 08 02 00 00 00 00 00 20 00 00 00 07 10 00 00 00
+report09	: 10 08 02 00 00 00 00 00 20 00 00 00 08 10 00 00 00
+report10	: 10 08 02 00 00 00 00 00 20 00 00 00 09 10 00 00 00
+table01		: 10 08 00 00 00 00 00 00 20 00 00 00 0a 10 00 00 00
+table02		: 10 08 00 00 00 00 00 00 20 00 00 00 0b 10 00 00 00
+table03		: 10 08 00 00 00 00 00 00 20 00 00 00 0c 10 00 00 00
+table04		: 10 08 00 00 00 00 00 00 20 00 00 00 0d 10 00 00 00
+table05		: 10 08 00 00 00 00 00 00 20 00 00 00 0e 10 00 00 00
+table06		: 10 08 00 00 00 00 00 00 20 00 00 00 0f 10 00 00 00
+table07		: 10 08 00 00 00 00 00 00 20 00 00 00 10 10 00 00 00
+table08		: 10 08 00 00 00 00 00 00 20 00 00 00 11 10 00 00 00
+table09		: 10 08 00 00 00 00 00 00 20 00 00 00 12 10 00 00 00
+table10		: 10 08 00 00 00 00 00 00 20 00 00 00 13 10 00 00 00
+none		: 10 08 00 00 00 00 00 00 20 00 00 00 15 10 00 00 00
+**/
+
+XclPTAutoFormat::XclPTAutoFormat() :
+    mbReport( 0 ),
+    mnAutoFormat( 0 ),
+    mbGridLayout( 0x10 )
+{
+}
+
+void XclPTAutoFormat::Init( const ScDPObject& rDPObj )
+{
+	if( rDPObj.GetHeaderLayout() )
+	{
+		mbReport 	 = 0;
+		mnAutoFormat = 1;
+		mbGridLayout = 0;
+	}
+	else
+	{
+		// Report1 for now
+		// TODO : sync with autoformat indicies
+		mbReport 	 = 2;
+		mnAutoFormat = 1;
+		mbGridLayout = 0x10;
+	}
+}
+
+XclImpStream& operator>>( XclImpStream& rStrm, XclPTAutoFormat& rInfo )
+{
+    rStrm.Ignore( 2 );
+    rStrm >> rInfo.mbReport;     		/// 2 for report* fmts ?
+    rStrm.Ignore( 6 );
+    return rStrm
+        >> rInfo.mnAutoFormat
+        >> rInfo.mbGridLayout;
+}
+
+XclExpStream& operator<<( XclExpStream& rStrm, const XclPTAutoFormat& rInfo )
+{
+    return rStrm
+        << EXC_PT_AUTOFMT_HEADER
+        << rInfo.mbReport
+		<< EXC_PT_AUTOFMT_ZERO
+        << EXC_PT_AUTOFMT_FLAGS
+        << rInfo.mnAutoFormat
+        << rInfo.mbGridLayout;
+}
+
+// ============================================================================
+
diff -rup sc/source/filter/inc/xepivot.hxx sc/source/filter/inc/xepivot.hxx
--- sc/source/filter/inc/xepivot.hxx	2006-07-10 09:55:31.000000000 -0400
+++ sc/source/filter/inc/xepivot.hxx	2006-11-01 11:26:54.000000000 -0500
@@ -421,6 +421,8 @@ private:
     void                WriteSxli( XclExpStream& rStrm, sal_uInt16 nLineCount, sal_uInt16 nIndexCount ) const;
     /** Writes the SXEX records containing additional pivot table info. */
     void                WriteSxex( XclExpStream& rStrm ) const;
+    /** Writes the SX_AUTOFORMAT records with the autoformat id and header layout */
+    void                WriteSxAutoformat( XclExpStream& rStrm ) const;
 
     // ------------------------------------------------------------------------
 private:
@@ -431,6 +433,7 @@ private:
     const XclExpPivotCache& mrPCache;       /// The pivot cache this pivot table bases on.
     XclPTInfo           maPTInfo;           /// Info about the pivot table (SXVIEW record).
     XclPTExtInfo        maPTExtInfo;        /// Extended info about the pivot table (SXEX record).
+	XclPTAutoFormat		maPTAutoFormat;		/// The selected autoformat (SX_AUTOFORMAT)
     XclExpPTFieldList   maFieldList;        /// All fields in pivot cache order.
     ScfUInt16Vec        maRowFields;        /// Row field indexes.
     ScfUInt16Vec        maColFields;        /// Column field indexes.
diff -rup sc/source/filter/inc/xipivot.hxx sc/source/filter/inc/xipivot.hxx
--- sc/source/filter/inc/xipivot.hxx	2006-07-10 09:59:59.000000000 -0400
+++ sc/source/filter/inc/xipivot.hxx	2006-10-31 06:50:03.000000000 -0500
@@ -343,6 +343,8 @@ public:
     void                ReadSxdi( XclImpStream& rStrm );
     /** Reads an SXEX record containing additional settings for the pivot table. */
     void                ReadSxex( XclImpStream& rStrm );
+    /** Reads an SX_AUTOFORMAT record that specifies the pivot tables autoformat. */
+    void                ReadSxAutoformat( XclImpStream& rStrm );
 
     // ------------------------------------------------------------------------
 
@@ -357,6 +359,7 @@ private:
 
     XclPTInfo           maPTInfo;           /// General info about the pivot table (SXVIEW record).
     XclPTExtInfo        maPTExtInfo;        /// Extended info about the pivot table (SXEX record).
+    XclPTAutoFormat     maPTAutoFormat;     /// The selected autoformat (SX_AUTOFORMAT)
     XclImpPTFieldVec    maFields;           /// Vector containing all fields.
     XclImpPTFieldRef    mxCurrField;        /// Current field for importing additional info.
     ScfStringVec        maVisFieldNames;    /// Vector containing all visible field names.
@@ -417,6 +420,8 @@ public:
     void                ReadSxvi( XclImpStream& rStrm );
     /** Reads an SXEX record containing additional settings for a pivot table. */
     void                ReadSxex( XclImpStream& rStrm );
+    /** Reads an SX_AUTOFORMAT record that specifies the pivot tables autoformat. */
+    void                ReadSxAutoformat( XclImpStream& rStrm );
 
     // ------------------------------------------------------------------------
 
diff -rup sc/source/filter/inc/xlpivot.hxx sc/source/filter/inc/xlpivot.hxx
--- sc/source/filter/inc/xlpivot.hxx	2006-10-18 07:46:00.000000000 -0400
+++ sc/source/filter/inc/xlpivot.hxx	2006-11-01 12:06:03.000000000 -0500
@@ -63,6 +63,9 @@
 #ifndef SC_XLADDRESS_HXX
 #include "xladdress.hxx"
 #endif
+#ifndef SC_DPOBJECT_HXX
+#include "dpobject.hxx"
+#endif
 
 class XclImpStream;
 class XclExpStream;
@@ -94,6 +97,10 @@ const sal_uInt16 EXC_PT_MAXDATACOUNT    
 // pivot table items
 const sal_uInt16 EXC_PT_MAXITEMCOUNT        = 32500;
 
+const sal_uInt16 EXC_PT_AUTOFMT_HEADER      = 0x810;
+const sal_uInt16 EXC_PT_AUTOFMT_ZERO        = 0;
+const sal_uInt32 EXC_PT_AUTOFMT_FLAGS       = 0x20;
+
 /** Data type of a pivot cache item. */
 enum XclPCItemType
 {
@@ -412,6 +419,9 @@ const double EXC_SXDBEX_CREATION_DATE   
 const sal_uInt16 EXC_ID_SXFDBTYPE           = 0x01BB;
 const sal_uInt16 EXC_SXFDBTYPE_DEFAULT      = 0x0000;
 
+// (0x0810) PIVOT_AUTOFORMAT	// 2006/10/17 JEG no docs, but seems to contain the autoformat
+const sal_uInt16 EXC_ID_SX_AUTOFORMAT       = 0x0810;
+
 // ============================================================================
 // Pivot cache
 // ============================================================================
@@ -798,5 +808,22 @@ XclExpStream& operator<<( XclExpStream& 
 
 // ============================================================================
 
+// Pivot table autoformat settings ==============================================
+
+/** Pivot table autoformat settings (SX_AUTOFORMAT record). */
+struct XclPTAutoFormat
+{
+    sal_uInt32          mbReport;     		/// 2 for report* fmts ?
+    sal_uInt8           mnAutoFormat;       /// AutoFormat ID
+    sal_uInt32          mbGridLayout;       /// 0 == gridlayout, 0x10 == modern
+
+    explicit            XclPTAutoFormat();
+	void				Init( const ScDPObject& rDPObj );
+};
+
+XclImpStream& operator>>( XclImpStream& rStrm, XclPTAutoFormat& rInfo );
+XclExpStream& operator<<( XclExpStream& rStrm, const XclPTAutoFormat& rInfo );
+
+// ============================================================================
 #endif
 
diff -rup sc/source/filter/xml/XMLExportDataPilot.cxx sc/source/filter/xml/XMLExportDataPilot.cxx
--- sc/source/filter/xml/XMLExportDataPilot.cxx	2006-10-30 10:45:07.000000000 -0500
+++ sc/source/filter/xml/XMLExportDataPilot.cxx	2006-11-01 16:30:11.000000000 -0500
@@ -851,6 +851,8 @@ void ScXMLExportDataPilot::WriteDataPilo
                             rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_FILTER_BUTTON, XML_FALSE);
                         if (!pDPSave->GetDrillDown())
                             rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DRILL_DOWN_ON_DOUBLE_CLICK, XML_FALSE);
+						if ((*pDPs)[i]->GetHeaderLayout ())
+                            rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_HEADER_GRID_LAYOUT, XML_TRUE);
 						SvXMLElementExport aElemDP(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_TABLE, sal_True, sal_True);
 						rExport.CheckAttrList();
 						if ((*pDPs)[i]->IsSheetData())
diff -rup sc/source/filter/xml/xmldpimp.cxx sc/source/filter/xml/xmldpimp.cxx
--- sc/source/filter/xml/xmldpimp.cxx	2006-07-21 08:52:13.000000000 -0400
+++ sc/source/filter/xml/xmldpimp.cxx	2006-11-01 16:15:47.000000000 -0500
@@ -158,7 +158,8 @@ ScXMLDataPilotTableContext::ScXMLDataPil
 	bTargetRangeAddress(sal_False),
 	bSourceCellRange(sal_False),
     bShowFilter(sal_True),
-    bDrillDown(sal_True)
+    bDrillDown(sal_True),
+	bHeaderGridLayout(sal_False)
 {
 	sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
 	const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetDataPilotTableAttrTokenMap();
@@ -221,6 +222,11 @@ ScXMLDataPilotTableContext::ScXMLDataPil
                 bDrillDown = IsXMLToken(sValue, XML_TRUE);
             }
             break;
+			case XML_TOK_DATA_PILOT_TABLE_ATTR_HEADER_GRID_LAYOUT :
+			{
+				bHeaderGridLayout = IsXMLToken(sValue, XML_TRUE);
+			}
+            break;
 		}
 	}
 
@@ -342,6 +348,7 @@ void ScXMLDataPilotTableContext::EndElem
 		pDPObject->SetName(sDataPilotTableName);
 		pDPObject->SetTag(sApplicationData);
 		pDPObject->SetOutRange(aTargetRangeAddress);
+		pDPObject->SetHeaderLayout(bHeaderGridLayout);
 		switch (nSourceType)
 		{
 			case SQL :
diff -rup sc/source/filter/xml/xmldpimp.hxx sc/source/filter/xml/xmldpimp.hxx
--- sc/source/filter/xml/xmldpimp.hxx	2005-10-25 07:00:50.000000000 -0400
+++ sc/source/filter/xml/xmldpimp.hxx	2006-11-01 15:37:02.000000000 -0500
@@ -129,6 +129,7 @@ class ScXMLDataPilotTableContext : publi
 	sal_Bool		bSourceCellRange;
     sal_Bool        bShowFilter;
     sal_Bool        bDrillDown;
+	sal_Bool		bHeaderGridLayout;
 
 	const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
 	ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
diff -rup sc/source/filter/xml/xmlimprt.cxx sc/source/filter/xml/xmlimprt.cxx
--- sc/source/filter/xml/xmlimprt.cxx	2006-07-21 08:53:26.000000000 -0400
+++ sc/source/filter/xml/xmlimprt.cxx	2006-11-01 16:17:43.000000000 -0500
@@ -745,6 +745,7 @@ static __FAR_DATA SvXMLTokenMapEntry aDa
 	{ XML_NAMESPACE_TABLE, XML_BUTTONS,				    XML_TOK_DATA_PILOT_TABLE_ATTR_BUTTONS				},
 	{ XML_NAMESPACE_TABLE, XML_SHOW_FILTER_BUTTON,	    XML_TOK_DATA_PILOT_TABLE_ATTR_SHOW_FILTER_BUTTON	},
 	{ XML_NAMESPACE_TABLE, XML_DRILL_DOWN_ON_DOUBLE_CLICK, XML_TOK_DATA_PILOT_TABLE_ATTR_DRILL_DOWN			},
+	{ XML_NAMESPACE_TABLE, XML_HEADER_GRID_LAYOUT,		XML_TOK_DATA_PILOT_TABLE_ATTR_HEADER_GRID_LAYOUT	},
 	XML_TOKEN_MAP_END
 };
 
diff -rup sc/source/filter/xml/xmlimprt.hxx sc/source/filter/xml/xmlimprt.hxx
--- sc/source/filter/xml/xmlimprt.hxx	2006-04-20 09:26:00.000000000 -0400
+++ sc/source/filter/xml/xmlimprt.hxx	2006-11-01 15:35:08.000000000 -0500
@@ -515,7 +515,8 @@ enum ScXMLDataPilotTableAttrTokens
 	XML_TOK_DATA_PILOT_TABLE_ATTR_TARGET_RANGE_ADDRESS,
 	XML_TOK_DATA_PILOT_TABLE_ATTR_BUTTONS,
     XML_TOK_DATA_PILOT_TABLE_ATTR_SHOW_FILTER_BUTTON,
-    XML_TOK_DATA_PILOT_TABLE_ATTR_DRILL_DOWN
+    XML_TOK_DATA_PILOT_TABLE_ATTR_DRILL_DOWN,
+    XML_TOK_DATA_PILOT_TABLE_ATTR_HEADER_GRID_LAYOUT
 };
 
 enum ScXMLDataPilotTableElemTokens
diff -rup xmloff/inc/xmltoken.hxx xmloff/inc/xmltoken.hxx
--- xmloff/inc/xmloff/xmltoken.hxx	2005-11-14 04:12:45.000000000 -0500
+++ xmloff/inc/xmloff/xmltoken.hxx	2006-11-01 15:33:48.000000000 -0500
@@ -2494,6 +2494,7 @@ namespace xmloff { namespace token {
 
         XML_SHOW_FILTER_BUTTON,
         XML_DRILL_DOWN_ON_DOUBLE_CLICK,
+        XML_HEADER_GRID_LAYOUT,
         XML_GROUPED_BY,
         XML_DAYS,
         XML_MONTHS,
diff -rup xmloff/source/core/xmltoken.cxx xmloff/source/core/xmltoken.cxx
--- xmloff/source/core/xmltoken.cxx	2006-10-24 09:33:59.000000000 -0400
+++ xmloff/source/core/xmltoken.cxx	2006-11-01 15:33:35.000000000 -0500
@@ -2499,6 +2499,7 @@ namespace xmloff { namespace token {
 
         TOKEN( "show-filter-button",                   XML_SHOW_FILTER_BUTTON ),
         TOKEN( "drill-down-on-double-click",           XML_DRILL_DOWN_ON_DOUBLE_CLICK ),
+        TOKEN( "header-grid-layout",           		   XML_HEADER_GRID_LAYOUT ),
         TOKEN( "grouped-by",                           XML_GROUPED_BY ),
         TOKEN( "days",                                 XML_DAYS ),
         TOKEN( "months",                               XML_MONTHS ),
