Hi, thanks for the reply, I done what you suggested, seems the content types were needing removed and the definedNames
The content types are in order so removing at the array index works ok but the defined names are not in any order, how can I use xlsxRemove to target a specific localSheetId.
the xml looks like this
<definedNames>
<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="5">ARCS!$A$4:$C$4</definedName>
<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="4">'Digital Publications'!$A$4:$H$4</definedName>
<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="2">'Paper Charts'!$A$4:$F$4</definedName>
<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="3">'Paper Publications'!$A$4:$H$4</definedName>
<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="1">Subscriptions!$A$4:$F$4</definedName>
<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="0">Vessel!$A$4:$H$4</definedName>
</definedNames>
and im using this to remove the sheet, content types and defined names
{{#compare Valid false}}
{{#xlsxRemove "xl/workbook.xml" "workbook.sheets[0].sheet" 1}}
{{/xlsxRemove }}
{{#xlsxRemove "[Content_Types].xml" "Types.Override" 1}}
{{/xlsxRemove}}
{{#xlsxRemove "xl/workbook.xml" "workbook.definedNames[0].definedName" 3}}
{{/xlsxRemove}}
{{/compare}}
regards