001package com.hfg.xml.msofficexml.xlsx.part; 002 003 004import com.hfg.xml.msofficexml.OfficeOpenXmlRelationship; 005import com.hfg.xml.msofficexml.RelationshipType; 006import com.hfg.xml.msofficexml.part.OfficeOpenXmlRelationshipPart; 007import com.hfg.xml.msofficexml.xlsx.Xlsx; 008import com.hfg.xml.msofficexml.xlsx.spreadsheetml.SsmlXML; 009 010public class WorkbookRelationshipPart extends OfficeOpenXmlRelationshipPart 011{ 012 //--------------------------------------------------------------------------- 013 public WorkbookRelationshipPart(Xlsx inParentDoc) 014 { 015 super(inParentDoc); 016 017 setFile(SsmlXML.WORKBOOK_RELATIONSHIP_FILE); 018 } 019 020 //--------------------------------------------------------------------------- 021 public String addWorksheet(WorksheetPart inValue) 022 { 023 OfficeOpenXmlRelationship relationship = new OfficeOpenXmlRelationship(); 024 relationship.setPart(inValue) 025 .setType(RelationshipType.WORKSHEET); 026 027 return addRelationship(relationship); 028 } 029 030}