hyb
2025-12-30 399ffc4d9829f70529d3b096fe4228f7496cc566
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Ë
dñúh7ãóð—dZddlmZddlmZmZddlmZmZddl    Z    ddl
m Z e    jd«Z d    Zd
Zd Ze    jd ezd ze    j"«ZdZe    jdj)ee«e    j"«Zd„Zd„Zd„Zdgee«zZed¬«d„«Zeed«Dcic]\}}||“Œ
c}}ZdZed¬«d„«Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%ycc}}w)zT
Collection of utilities used within the package and also available for client code
é)Ú    lru_cache)ÚchainÚproduct)Úascii_uppercaseÚdigitsNé)ÚCellCoordinatesExceptionz^[$]?([A-Za-z]{1,3})[$]?(\d+)$z[A-Z]{1,3}:[A-Z]{1,3}:z\d+:\d+:zq
[$]?(?P<min_col>[A-Za-z]{1,3})?
[$]?(?P<min_row>\d+)?
(:[$]?(?P<max_col>[A-Za-z]{1,3})?
[$]?(?P<max_row>\d+)?)?
ú^ú$z7
(('(?P<quoted>([^']|'')*)')|(?P<notquoted>[^'^ ^!]*))!z{0}(?P<cells>{1})(?=,?)cóėt|t«r t|«}t|t«r t|«}t||dz«Dcgc] }t    |«‘Œc}Scc}w)z¤
    Given the start and end columns, return all the columns in the series.
 
    The start and end columns can be either column letters or 1-based
    indexes.
    r)Ú
isinstanceÚstrÚcolumn_index_from_stringÚrangeÚget_column_letter)ÚstartÚendÚxs   úFH:\Change_password\venv_build\Lib\site-packages\openpyxl/utils/cell.pyÚget_column_intervalrsQ€ô%œÔÜ(¨Ó/ˆÜ#”sÔÜ& sÓ+ˆÜ*/°°s¸Q±wÓ*?Ö @ QÔ ˜aÕ  Ò @Ð@ùÒ @sÁAcó¼—tj|«}|sd|›d}t|«‚|j«\}}t    |«}|sd|›d}t|«‚||fS)z;Convert a coordinate string like 'B12' to a tuple ('B', 12)zInvalid cell coordinates (ú)zThere is no row 0 ()ÚCOORD_REÚmatchr    ÚgroupsÚint)Ú coord_stringrÚmsgÚcolumnÚrows     rÚcoordinate_from_stringr!,sj€ä N‰N˜<Ó (€EÙ Ø*¨<¨.¸Ð:ˆÜ& sÓ+Ð+Ø—,‘,“.K€FˆCÜ
ˆc‹(€CÙ Ø# L >°Ð3ˆÜ& sÓ+Ð+Ø 3ˆ;Ðócóö—tj|«}|st|›d«‚|jd«}|j    «D]\}}|sŒ    d|›||<Œ|ds|drd}nd}|j
di|¤ŽS)    zDConvert a coordinate to an absolute coordinate string (B12 -> $B$12)z  is not a valid coordinate rangeÚr Úmax_colÚmax_rowz%{min_col}{min_row}:{max_col}{max_row}z{min_col}{min_row}©)Ú ABSOLUTE_RErÚ
ValueErrorÚ    groupdictÚitemsÚformat)rÚmÚdÚkÚvÚfmts      rÚabsolute_coordinater2:s‹€ä×ј,Ó'€A٠ܘL˜>Ð)IÐJÓKÐKà     ‰ B‹€AØ—‘“    ò‰ˆˆ1Ú Øqc7ˆAˆaŠDðð    ˆ‚|q˜’|Ø5‰à"ˆØ ˆ3:‰:‰?˜‰?Ðr"r$)Úmaxsizecó—d|cxkrdksntdj|««‚g}|dkr    t|S|rDt|d«\}}|j    dt|«|s|dz}|j    dd«|rŒDdj |«S)aÎ
    Convert decimal column position to its ASCII (base 26) form.
 
    Because column indices are 1-based, strides are actually pow(26, n) + 26
    Hence, a correction is applied between pow(26, n) and pow(26, 2) + 26 to
    prevent and additional column letter being prepended
 
    "A" == 1 == pow(26, 0)
    "Z" == 26 == pow(26, 0) + 26 // decimal equivalent 10
    "AA" == 27 == pow(26, 1) + 1
    "ZZ" == 702 == pow(26, 2) + 26 // decimal equivalent 100
    rifGzInvalid column index {0}érÚZr$)r)r,Ú__decimal_to_alphaÚdivmodÚinsertÚjoin)Úcol_idxÚresultÚ    remainders   rrrNs–€ð Ô  ˜5Ô  ÜÐ3×:Ñ:¸7ÓCÓDÐDà €Fà‚|Ü! 'Ñ*Ð*á
Ü# G¨RÓ0шØ ‰ aÔ+¨IÑ6Ô7ÙØ q‰LˆGØ M‰M˜!˜SÔ !ò ð 7‰76‹?Ðr")rr5i¤cóB—d|›d}t|«dkDr t|«‚d}t|j««}t    |t
«D]\}}    t |}|||zz }Œd|cxkrdkst|«‚t|«‚|S#t$r t|«‚wxYw)zÊ
    Convert ASCII column name (base 26) to decimal with 1-based index
 
    Characters represent descending multiples of powers of 26
 
    "AFZ" == 26 * pow(26, 0) + 6 * pow(26, 1) + 1 * pow(26, 2)
    ú'z<' is not a valid column name. Column names are from A to ZZZérigG)Úlenr)ÚreversedÚupperÚzipÚ__powersÚ__alpha_to_decimalÚKeyError)ÚcolÚ    error_msgÚidxÚletterÚpowerÚposs      rrrrsÀ€ðC5ÐTÐU€IÜ
ˆ3ƒx!‚|ܘÓ#Ð#Ø
€CÜ
3—9‘9“;Ó
€CܘS¤(Ó+ò‰ ˆð    (Ü$ VÑ,ˆCð     ˆsU‰{щð ð ˆsŒ?UŠ?ܘÓ#Ð#ð ܘÓ#Ð#Ø €Jøô ò    (ܘYÓ'Ð 'ð    (ús Á    B        Bcó²—dj|«}tj|«}|s t|«‚|j    «\}}}}}|rM||f}||f}    t ||    z«s7t |«r t |    «r!t |    «r t |«r t|«‚| t|«}| t|«}| t|«}n|}| t|«}n|}||||fS)z³
    Convert a range string into a tuple of boundaries:
    (min_col, min_row, max_col, max_row)
    Cell coordinates will be converted into a range with the cell at both end
    z&{0} is not a valid coordinate or range)    r,r(rr)rÚallÚanyrr)
Ú range_stringrr-Úmin_colÚmin_rowÚsepr%r&ÚcolsÚrowss
          rÚrange_boundariesrW‹sç€ð 3×
9¸,Ó
G€CÜ×ј,Ó'€A٠ܘ‹oÐà./¯h©h«jÑ+€GˆWc˜7 Gá
ؘЈؘЈô t‘ Ô Ü ŒIœc $œiÜ ŒIœc $œiä˜S“/Ð !àÐÜ*¨7Ó3ˆàÐܐg“,ˆàÐÜ*¨7Ó3‰àˆàÐܐg“,‰àˆà G˜W gÐ -Ð-r"c#óڇK—t|«\}}}}t||dz«}t||dz«Dcgc] }t|«‘Œ}}|D]Štˆfd„|D««–—Œycc}w­w)ú[
    Get individual addresses for every cell in a range.
    Yields one row at a time.
    rc3óB•K—|]}dj|‰«–—Œy­w©z{0}{1}N©r,)Ú.0rHr s  €rú    <genexpr>z"rows_from_range.<locals>.<genexpr>¿óøèø€Ò>°#H—O‘O C¨×-Ñ>ùóƒN)rWrrÚtuple)    rQrRrSr%r&rVrHrUr s            @rÚrows_from_rangerb¶svøèø€ô
*:¸,Ó)GÑ&€GˆWg˜wÜ ˜' A™+Ó &€DÜ.3°G¸WÀq¹[Ó.IÖ J sÔ ˜cÕ "Ð J€DÐ JØò?ˆÜÓ>¸Ô>Ó>Ó>ñ?ùò Kùsƒ1A+´A&Á%A+c#ó²‡K—t|«\}}}}t||dz«}d„t||dz«D«}|D]Štˆfd„|D««–—Œy­w)rYrc3ó2K—|]}t|«–—Œy­w)N)r)r]rHs  rr^z"cols_from_range.<locals>.<genexpr>Ésèø€Ò H sÔ ˜c× "Ñ Hùs‚c3óB•K—|]}dj‰|«–—Œy­wr[r\)r]r rHs  €rr^z"cols_from_range.<locals>.<genexpr>Ër_r`N)rWrra)rQrRrSr%r&rVrUrHs       @rÚcols_from_rangerfÂsaøèø€ô
*:¸,Ó)GÑ&€GˆWg˜wÜ ˜' !™)Ó $€DÙ H¬e°G¸WÀQ¹YÓ.GÔ H€DØò?ˆÜÓ>¸Ô>Ó>Ó>ñ?ùsƒAAcó|—t|«D]\}}|tvsŒn|d}||d}t|«t|«fS)zB
    Convert an Excel style coordinate to (row, column) tuple
    N)Ú    enumeraterrr)Ú
coordinaterJÚcrHr s     rÚcoordinate_to_tuplerkÎsU€ô˜JÓ'ò‰ˆˆQØ ”Š;Ù ðð TcÐ
€CØ
STÐ
€CÜ ˆs‹8Ô-¨cÓ2Ð 2Ð2r"cóΗtj|«}|€ td«‚|jd«xs|jd«}|jd«}t    |«}||fS)zc
    Convert a worksheet range to the sheetname and maximum and minimum
    coordinate indices
    z)Value must be of the form sheetname!A1:E4ÚquotedÚ    notquotedÚcells)Ú SHEETRANGE_RErr)ÚgrouprW)rQr-Ú    sheetnameroÚ
boundariess     rÚrange_to_tuplertÚsd€ô
    ×јLÓ)€AØ€yÜÐDÓEÐEØ—‘˜Ó!Ò9 Q§W¡W¨[Ó%9€IØ G‰GGÓ €EÜ! %Ó(€JØ jÐ  Ð r"cóT—d|vr|jdd«}dj|«}|S)z>
    Add quotes around sheetnames if they contain spaces.
    r?z''z'{0}')Úreplacer,)rrs rÚquote_sheetnamerwès2€ð ˆiÑØ×%Ñ% c¨4Ó0ˆ    à—‘     Ó*€IØ Ðr")&Ú__doc__Ú    functoolsrÚ    itertoolsrrÚstringrrÚreÚ
exceptionsr    ÚcompilerÚ    COL_RANGEÚ    ROW_RANGEÚ
RANGE_EXPRÚVERBOSEr(Ú SHEET_TITLEr,rprr!r2Úlistr7rrhrFrErrWrbrfrkrtrw)rMrKs00rú<module>r…s2ðñõ ß$ß*Û    å0ð ˆ2:‰:Ð7Ó 8€Ø (€    Ø €    ð€
ð ˆbj‰j˜˜zÑ)¨3Ñ.°·
±
Ó;€ ð:€ à—
‘
Ð8×?Ñ?ØóØ Ÿj™jó*€ ò Aò òð$T™D Ó1Ñ1Ðá
4Ôñóðñ@5>¸oÈqÓ4Q×R¡[ S¨&f˜S‘jÓRÐØ €á
4Ôñóðò0(.òV    ?ò    ?ò    3ò !óùósSsÂ= C2