+
    Ĝij                         R t ^ RIHt ^ RIHtHtHtHtHtH	t	H
t
 ^ RIHtHt ^ RIHtHt ^ RIHtHt ^ RIHt ^ RIHtHtHt ^ RIHt ^ R	IHt R
 t ! R R4      tR# )z2Write the workbook global settings to the archive.)quote_sheetname)ARC_APPARC_CORE
ARC_CUSTOMARC_WORKBOOK
PKG_REL_NSCUSTOMUI_NSARC_ROOT_RELS)tostring
fromstring)RelationshipRelationshipList)DefinedNameDefinedNameList)ExternalReference)
ChildSheetWorkbookPackage
PivotCache)WorkbookProperties)CALENDAR_MAC_1904c                :   \        V P                  4       UUu. uF  w  rVP                  R8X  g   K  VNK  	  pppV'       g   \        R4      hV P                  pV P
                  pV'       d   VP                  R8X  d   V# W1R  F  pWn        Vu # 	  R# u uppi )zr
Return the index of the active sheet.
If the sheet set to active is hidden return the next visible sheet or None
visiblez"At least one sheet must be visibleN)	enumerate_sheetssheet_state
IndexError_active_sheet_indexactive)wbidxsheetvisible_sheetss   &   b/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/openpyxl/workbook/_writer.pyget_active_sheetr#      s    
 -6bjj,Ad,AjcUEVEVZcEccc,ANd=>>

 
 CIIE""i/
d#	
 $  es
   BBc                   \   a  ] tR t^1t o R tR tR tR tR tR t	R t
R tR	 tR
 tRtV tR# )WorkbookWriterc                    Wn         \        4       V n        \        4       V n        VP
                  V P                  n        VP                  V P                  n        R # )N)	r   r   relsr   packagesecurityworkbookProtectioncalculationcalcPr)selfr   s   &&r"   __init__WorkbookWriter.__init__3   s;    $&	&(*,++' nn    c                    \        4       pV P                  P                  e   V P                  P                  Vn        V P                  P                  \
        8X  d   RVn        WP                  n        R # )NT)	r   r   	code_namecodeNameexcel_base_dater   date1904r(   
workbookPr)r-   propss   & r"   write_propertiesWorkbookWriter.write_properties;   sO    "$77(!WW..EN77""&77!EN"'r0   c                
   \        V P                  P                  ^4       F  w  r\        VP                  VRP                  V4      R7      p\        VP                  VP                  R7      pV P                  P                  V4       VP                  R8X  gA   \        V P                  P                  4      ^8X  d   \        R4      hVP                  Vn        V P                  P                   P                  V4       K  	  R# )   zrId{0})namesheetIdidtypeTargetr   z1The only worksheet of a workbook cannot be hiddenN)r   r   r   r   titleformatr   	_rel_typepathr'   appendr   len
ValueErrorstater(   sheets)r-   r   r    
sheet_noderels   &    r"   write_worksheetsWorkbookWriter.write_worksheetsE   s    #DGGOOQ7JC#chooVYFZ[JEOOEJJGCIIS!$$	1tww'1,$%XYY#(#4#4
 LL&&z2 8r0   c                z   V P                   P                   F  p\        V P                   P                  4      ^,           p\	        VP
                  VP                  R7      pV P                  P                  V4       \        VP                  R7      pV P                  P                  P                  V4       K  	  R# )r;   r?   )r>   N)r   _external_linksrG   r'   r   rD   rE   rF   r   r>   r(   externalReferences)r-   linkrIdrL   exts   &    r"   
write_refsWorkbookWriter.write_refsR   sy    GG++Ddggll#a'CDNN499ECIIS!#svv.CLL++2237 ,r0   c                D   \        V P                  P                  P                  4       4      p\	        V P                  P
                  4       EF3  w  r#\        VP                  4      pVP                  '       d;   VP                  P                  4       pV F	  pW&n        K  	  VP                  V4       VP                  '       d6   \        R VRR7      pV RVP                   2Vn        VP                  V4       VP                  '       d0   \        RVR7      pVP                  Vn        VP                  V4       VP                  '       g   EK  \        RVR7      pVP                  Vn        VP                  V4       EK6  	  \!        VR7      V P"                  n        R# )	_FilterDatabaseT)r<   localSheetIdhidden!Print_Titles)r<   rY   
Print_Area)definedNameN)listr   defined_namesvaluesr   
worksheetsr   rB   rY   extendauto_filterr   valuerF   print_titles
print_arear   r(   definedNames)r-   r`   r   r    quotednamesnr<   s   &       r"   write_namesWorkbookWriter.write_names\   sC   TWW2299;<#DGG$6$67JC$U[[1F """++224A%(N $$U+   "(9TXY &xq):):(;<
$$T*!!!"SI"//
$$T*"3G"--
$$T*/ 82 %4$N!r0   c                   \        4       pV P                  P                   F  pVP                  V9  g   K  VP	                  VP                  4       \        VP                  R 7      pV P                  P                  P                  V4       \        VP                  P                  VP                  P                  R7      pV P                  P                  V4       VP                  Vn        K  	  R# ))cacheIdTyperA   N)setr   _pivotscacheaddr   ro   r(   pivotCachesrF   r   rel_typerE   r'   r>   )r-   pivot_cachespivotcrL   s   &    r"   write_pivotsWorkbookWriter.write_pivots{   s    uWW__E{{,.  -u}}5((//2"(<(<U[[EUEUV		  %vv %r0   c                    \        V P                  4      pV P                  P                  '       d"   WP                  P                  ^ ,          n        V P                  P                  V P                  n        R# )    N)r#   r   views	activeTabr(   	bookViews)r-   r   s   & r"   write_viewsWorkbookWriter.write_views   sD    !$''*77===)/GGMM!&!%r0   c                   V P                  4        V P                  4        V P                  4        V P                  4        V P	                  4        V P                  4        \        V P                  P                  4       4      # )zWrite the core workbook xml.)	r8   rM   rl   r{   r   rU   r
   r(   to_tree)r-   s   &r"   writeWorkbookWriter.write   sb     	,,.//r0   c                ~   \        RRR7      pV P                  P                  V4       \        RRR7      pV P                  P                  V4       V P                  P                  '       d0   \        RRR7      pRVn        V P                  P                  V4       \        V P                  P                  4       4      # )	z%Write the workbook relationships xml.stylesz
styles.xmlr?   themeztheme/theme1.xml zvbaProject.binzAhttp://schemas.microsoft.com/office/2006/relationships/vbaProject)r   r'   rF   r   vba_archiverq   r
   r   )r-   r   r   vbas   &   r"   
write_relsWorkbookWriter.write_rels   s     H\B		 73EF		77R0@ACYCHIIS!		))+,,r0   c                   \        4       p\        R\        R7      pVP                  V4       \        \         R2\
        R7      pVP                  V4       \        R\        R7      pVP                  V4       \        V P                  P                  4      ^8  d#   \        R\        R7      pVP                  V4       V P                  P                  ev   \        V P                  P                  P                  \        4      4      p\         P                  ! V4      pVP!                  \"        4       F  pVP                  V4       K  	  \%        VP'                  4       4      # )zWrite the package relationshipsofficeDocumentr?   z/metadata/core-propertiesrp   zextended-propertieszcustom-properties)r   r   r   rF   r   r   r   rG   r   custom_doc_propsr   r   r   readr	   	from_treefindr   r
   r   )r-   r'   rL   xml	root_relss   &    r"   write_root_relsWorkbookWriter.write_root_rels   s      ! 0FC:,.G HQYZC 5gFCtww''(A-$7
KCKK77*TWW0055mDEC(2237I ~~k2C  3 ''r0   )r(   r'   r   N)__name__
__module____qualname____firstlineno__r.   r8   rM   rU   rl   r{   r   r   r   r   __static_attributes____classdictcell__)__classdict__s   @r"   r%   r%   1   s=     -(
38O>	/
0-"( (r0   r%   N) __doc__openpyxl.utilsr   openpyxl.xml.constantsr   r   r   r   r   r   r	   openpyxl.xml.functionsr
   r   openpyxl.packaging.relationshipr   r   openpyxl.workbook.defined_namer   r   $openpyxl.workbook.external_referencer   openpyxl.packaging.workbookr   r   r   openpyxl.workbook.propertiesr   openpyxl.utils.datetimer   r#   r%    r0   r"   <module>r      sL    9 *   8 J C O O ; 5*T( T(r0   