[{"data":1,"prerenderedAt":1063},["ShallowReactive",2],{"doc:\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fread-cell-value-from-excel-with-openpyxl":3,"surround:\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fread-cell-value-from-excel-with-openpyxl":1054},{"id":4,"title":5,"body":6,"description":1045,"extension":1046,"meta":1047,"navigation":99,"path":1048,"seo":1049,"stem":1052,"__hash__":1053},"docs\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fread-cell-value-from-excel-with-openpyxl\u002Findex.md","Read a Cell Value From Excel With openpyxl",{"type":7,"value":8,"toc":1031},"minimark",[9,28,33,36,61,65,71,271,275,286,353,369,373,392,462,466,476,557,572,576,582,667,671,686,773,790,794,911,920,924,933,937,947,960,979,985,989,1007,1011,1027],[10,11,12,13,18,19,23,24,27],"p",{},"When you need the value of one cell — or a precise rectangle of cells — rather than a whole DataFrame, openpyxl is the direct tool. It opens a workbook, exposes every cell by coordinate, and lets you choose between a formula's text and its cached result. This guide, part of ",[14,15,17],"a",{"href":16},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002F","Using openpyxl for Excel File Manipulation",", walks through ",[20,21,22],"code",{},"load_workbook",", both cell-access styles, iterating rows, reading a range, and the ",[20,25,26],{},"data_only"," flag — with every snippet building its own sample file.",[29,30,32],"h2",{"id":31},"prerequisites","Prerequisites",[10,34,35],{},"Install openpyxl:",[37,38,43],"pre",{"className":39,"code":40,"language":41,"meta":42,"style":42},"language-bash shiki shiki-themes github-light github-dark","pip install openpyxl\n","bash","",[20,44,45],{"__ignoreMap":42},[46,47,50,54,58],"span",{"class":48,"line":49},"line",1,[46,51,53],{"class":52},"sScJk","pip",[46,55,57],{"class":56},"sZZnC"," install",[46,59,60],{"class":56}," openpyxl\n",[29,62,64],{"id":63},"create-a-sample-workbook","Create a sample workbook",[10,66,67,68,70],{},"These examples read this file. It includes a formula in column C so the ",[20,69,26],{}," section has something to demonstrate:",[37,72,76],{"className":73,"code":74,"language":75,"meta":42,"style":42},"language-python shiki shiki-themes github-light github-dark","from openpyxl import Workbook\n\nwb = Workbook()\nws = wb.active\nws.title = \"Sales\"\nws[\"A1\"], ws[\"B1\"], ws[\"C1\"] = \"SKU\", \"Qty\", \"Total\"\nws[\"A2\"], ws[\"B2\"], ws[\"C2\"] = \"A-100\", 3, \"=B2*10\"\nws[\"A3\"], ws[\"B3\"], ws[\"C3\"] = \"B-200\", 5, \"=B3*10\"\nwb.save(\"sales.xlsx\")\nprint(\"wrote sales.xlsx\")\n","python",[20,77,78,94,101,113,124,135,174,210,245,257],{"__ignoreMap":42},[46,79,80,84,88,91],{"class":48,"line":49},[46,81,83],{"class":82},"szBVR","from",[46,85,87],{"class":86},"sVt8B"," openpyxl ",[46,89,90],{"class":82},"import",[46,92,93],{"class":86}," Workbook\n",[46,95,97],{"class":48,"line":96},2,[46,98,100],{"emptyLinePlaceholder":99},true,"\n",[46,102,104,107,110],{"class":48,"line":103},3,[46,105,106],{"class":86},"wb ",[46,108,109],{"class":82},"=",[46,111,112],{"class":86}," Workbook()\n",[46,114,116,119,121],{"class":48,"line":115},4,[46,117,118],{"class":86},"ws ",[46,120,109],{"class":82},[46,122,123],{"class":86}," wb.active\n",[46,125,127,130,132],{"class":48,"line":126},5,[46,128,129],{"class":86},"ws.title ",[46,131,109],{"class":82},[46,133,134],{"class":56}," \"Sales\"\n",[46,136,138,141,144,147,150,152,155,158,160,163,166,169,171],{"class":48,"line":137},6,[46,139,140],{"class":86},"ws[",[46,142,143],{"class":56},"\"A1\"",[46,145,146],{"class":86},"], ws[",[46,148,149],{"class":56},"\"B1\"",[46,151,146],{"class":86},[46,153,154],{"class":56},"\"C1\"",[46,156,157],{"class":86},"] ",[46,159,109],{"class":82},[46,161,162],{"class":56}," \"SKU\"",[46,164,165],{"class":86},", ",[46,167,168],{"class":56},"\"Qty\"",[46,170,165],{"class":86},[46,172,173],{"class":56},"\"Total\"\n",[46,175,177,179,182,184,187,189,192,194,196,199,201,205,207],{"class":48,"line":176},7,[46,178,140],{"class":86},[46,180,181],{"class":56},"\"A2\"",[46,183,146],{"class":86},[46,185,186],{"class":56},"\"B2\"",[46,188,146],{"class":86},[46,190,191],{"class":56},"\"C2\"",[46,193,157],{"class":86},[46,195,109],{"class":82},[46,197,198],{"class":56}," \"A-100\"",[46,200,165],{"class":86},[46,202,204],{"class":203},"sj4cs","3",[46,206,165],{"class":86},[46,208,209],{"class":56},"\"=B2*10\"\n",[46,211,213,215,218,220,223,225,228,230,232,235,237,240,242],{"class":48,"line":212},8,[46,214,140],{"class":86},[46,216,217],{"class":56},"\"A3\"",[46,219,146],{"class":86},[46,221,222],{"class":56},"\"B3\"",[46,224,146],{"class":86},[46,226,227],{"class":56},"\"C3\"",[46,229,157],{"class":86},[46,231,109],{"class":82},[46,233,234],{"class":56}," \"B-200\"",[46,236,165],{"class":86},[46,238,239],{"class":203},"5",[46,241,165],{"class":86},[46,243,244],{"class":56},"\"=B3*10\"\n",[46,246,248,251,254],{"class":48,"line":247},9,[46,249,250],{"class":86},"wb.save(",[46,252,253],{"class":56},"\"sales.xlsx\"",[46,255,256],{"class":86},")\n",[46,258,260,263,266,269],{"class":48,"line":259},10,[46,261,262],{"class":203},"print",[46,264,265],{"class":86},"(",[46,267,268],{"class":56},"\"wrote sales.xlsx\"",[46,270,256],{"class":86},[29,272,274],{"id":273},"read-one-cell-by-coordinate","Read one cell by coordinate",[10,276,277,278,281,282,285],{},"Load the workbook, pick a worksheet, and read ",[20,279,280],{},".value",". The ",[20,283,284],{},"[\"B2\"]"," syntax mirrors the spreadsheet UI:",[37,287,289],{"className":73,"code":288,"language":75,"meta":42,"style":42},"from openpyxl import load_workbook\n\nwb = load_workbook(\"sales.xlsx\")\nws = wb[\"Sales\"]                 # or wb.active for the first sheet\nprint(ws[\"B2\"].value)            # -> 3\n",[20,290,291,302,306,319,338],{"__ignoreMap":42},[46,292,293,295,297,299],{"class":48,"line":49},[46,294,83],{"class":82},[46,296,87],{"class":86},[46,298,90],{"class":82},[46,300,301],{"class":86}," load_workbook\n",[46,303,304],{"class":48,"line":96},[46,305,100],{"emptyLinePlaceholder":99},[46,307,308,310,312,315,317],{"class":48,"line":103},[46,309,106],{"class":86},[46,311,109],{"class":82},[46,313,314],{"class":86}," load_workbook(",[46,316,253],{"class":56},[46,318,256],{"class":86},[46,320,321,323,325,328,331,334],{"class":48,"line":115},[46,322,118],{"class":86},[46,324,109],{"class":82},[46,326,327],{"class":86}," wb[",[46,329,330],{"class":56},"\"Sales\"",[46,332,333],{"class":86},"]                 ",[46,335,337],{"class":336},"sJ8bj","# or wb.active for the first sheet\n",[46,339,340,342,345,347,350],{"class":48,"line":126},[46,341,262],{"class":203},[46,343,344],{"class":86},"(ws[",[46,346,186],{"class":56},[46,348,349],{"class":86},"].value)            ",[46,351,352],{"class":336},"# -> 3\n",[10,354,355,358,359,362,363,365,366,368],{},[20,356,357],{},"ws[\"B2\"]"," returns a ",[20,360,361],{},"Cell"," object; the data lives on its ",[20,364,280],{}," attribute. Forgetting ",[20,367,280],{}," gives you the cell wrapper, not the number.",[29,370,372],{"id":371},"read-a-cell-by-row-and-column-number","Read a cell by row and column number",[10,374,375,378,379,383,384,387,388,391],{},[20,376,377],{},"ws.cell(row=2, column=2)"," reaches the same cell numerically — the form you want inside loops or when coordinates are computed. openpyxl is ",[380,381,382],"strong",{},"1-based",": row 1 and column 1 are the top-left cell, so ",[20,385,386],{},"row=2, column=2"," is ",[20,389,390],{},"B2",":",[37,393,395],{"className":73,"code":394,"language":75,"meta":42,"style":42},"from openpyxl import load_workbook\n\nwb = load_workbook(\"sales.xlsx\")\nws = wb.active\nprint(ws.cell(row=2, column=2).value)   # -> 3, same cell as B2\n",[20,396,397,407,411,423,431],{"__ignoreMap":42},[46,398,399,401,403,405],{"class":48,"line":49},[46,400,83],{"class":82},[46,402,87],{"class":86},[46,404,90],{"class":82},[46,406,301],{"class":86},[46,408,409],{"class":48,"line":96},[46,410,100],{"emptyLinePlaceholder":99},[46,412,413,415,417,419,421],{"class":48,"line":103},[46,414,106],{"class":86},[46,416,109],{"class":82},[46,418,314],{"class":86},[46,420,253],{"class":56},[46,422,256],{"class":86},[46,424,425,427,429],{"class":48,"line":115},[46,426,118],{"class":86},[46,428,109],{"class":82},[46,430,123],{"class":86},[46,432,433,435,438,442,444,447,449,452,454,456,459],{"class":48,"line":126},[46,434,262],{"class":203},[46,436,437],{"class":86},"(ws.cell(",[46,439,441],{"class":440},"s4XuR","row",[46,443,109],{"class":82},[46,445,446],{"class":203},"2",[46,448,165],{"class":86},[46,450,451],{"class":440},"column",[46,453,109],{"class":82},[46,455,446],{"class":203},[46,457,458],{"class":86},").value)   ",[46,460,461],{"class":336},"# -> 3, same cell as B2\n",[29,463,465],{"id":464},"iterate-rows-with-values-only","Iterate rows with values only",[10,467,468,469,472,473,475],{},"To sweep a sheet, ",[20,470,471],{},"iter_rows(values_only=True)"," yields plain tuples of values instead of ",[20,474,361],{}," objects — less overhead and easier to unpack:",[37,477,479],{"className":73,"code":478,"language":75,"meta":42,"style":42},"from openpyxl import load_workbook\n\nwb = load_workbook(\"sales.xlsx\")\nws = wb.active\nfor sku, qty, total in ws.iter_rows(min_row=2, values_only=True):\n    print(sku, qty, total)\n",[20,480,481,491,495,507,515,549],{"__ignoreMap":42},[46,482,483,485,487,489],{"class":48,"line":49},[46,484,83],{"class":82},[46,486,87],{"class":86},[46,488,90],{"class":82},[46,490,301],{"class":86},[46,492,493],{"class":48,"line":96},[46,494,100],{"emptyLinePlaceholder":99},[46,496,497,499,501,503,505],{"class":48,"line":103},[46,498,106],{"class":86},[46,500,109],{"class":82},[46,502,314],{"class":86},[46,504,253],{"class":56},[46,506,256],{"class":86},[46,508,509,511,513],{"class":48,"line":115},[46,510,118],{"class":86},[46,512,109],{"class":82},[46,514,123],{"class":86},[46,516,517,520,523,526,529,532,534,536,538,541,543,546],{"class":48,"line":126},[46,518,519],{"class":82},"for",[46,521,522],{"class":86}," sku, qty, total ",[46,524,525],{"class":82},"in",[46,527,528],{"class":86}," ws.iter_rows(",[46,530,531],{"class":440},"min_row",[46,533,109],{"class":82},[46,535,446],{"class":203},[46,537,165],{"class":86},[46,539,540],{"class":440},"values_only",[46,542,109],{"class":82},[46,544,545],{"class":203},"True",[46,547,548],{"class":86},"):\n",[46,550,551,554],{"class":48,"line":137},[46,552,553],{"class":203},"    print",[46,555,556],{"class":86},"(sku, qty, total)\n",[10,558,559,560,563,564,567,568,571],{},"Drop ",[20,561,562],{},"min_row=2"," to include the header row. Use ",[20,565,566],{},"min_col","\u002F",[20,569,570],{},"max_col"," to bound the columns you read.",[29,573,575],{"id":574},"read-a-rectangular-range","Read a rectangular range",[10,577,578,579,581],{},"Index the worksheet with a range string to get a tuple of rows, each a tuple of cells. Pull ",[20,580,280],{}," from each to flatten it:",[37,583,585],{"className":73,"code":584,"language":75,"meta":42,"style":42},"from openpyxl import load_workbook\n\nwb = load_workbook(\"sales.xlsx\")\nws = wb.active\nvalues = [[cell.value for cell in row] for row in ws[\"A1:B3\"]]\nprint(values)   # [['SKU', 'Qty'], ['A-100', 3], ['B-200', 5]]\n",[20,586,587,597,601,613,621,657],{"__ignoreMap":42},[46,588,589,591,593,595],{"class":48,"line":49},[46,590,83],{"class":82},[46,592,87],{"class":86},[46,594,90],{"class":82},[46,596,301],{"class":86},[46,598,599],{"class":48,"line":96},[46,600,100],{"emptyLinePlaceholder":99},[46,602,603,605,607,609,611],{"class":48,"line":103},[46,604,106],{"class":86},[46,606,109],{"class":82},[46,608,314],{"class":86},[46,610,253],{"class":56},[46,612,256],{"class":86},[46,614,615,617,619],{"class":48,"line":115},[46,616,118],{"class":86},[46,618,109],{"class":82},[46,620,123],{"class":86},[46,622,623,626,628,631,633,636,638,641,643,646,648,651,654],{"class":48,"line":126},[46,624,625],{"class":86},"values ",[46,627,109],{"class":82},[46,629,630],{"class":86}," [[cell.value ",[46,632,519],{"class":82},[46,634,635],{"class":86}," cell ",[46,637,525],{"class":82},[46,639,640],{"class":86}," row] ",[46,642,519],{"class":82},[46,644,645],{"class":86}," row ",[46,647,525],{"class":82},[46,649,650],{"class":86}," ws[",[46,652,653],{"class":56},"\"A1:B3\"",[46,655,656],{"class":86},"]]\n",[46,658,659,661,664],{"class":48,"line":137},[46,660,262],{"class":203},[46,662,663],{"class":86},"(values)   ",[46,665,666],{"class":336},"# [['SKU', 'Qty'], ['A-100', 3], ['B-200', 5]]\n",[29,668,670],{"id":669},"formula-text-vs-cached-result-with-data_only","Formula text vs. cached result with data_only",[10,672,673,674,677,678,681,682,685],{},"By default openpyxl returns the ",[380,675,676],{},"formula string"," for a calculated cell. Pass ",[20,679,680],{},"data_only=True"," to get the ",[380,683,684],{},"cached result"," Excel last computed and stored in the file instead:",[37,687,689],{"className":73,"code":688,"language":75,"meta":42,"style":42},"from openpyxl import load_workbook\n\nformula = load_workbook(\"sales.xlsx\")\nprint(formula.active[\"C2\"].value)             # -> '=B2*10' (the formula text)\n\ncached = load_workbook(\"sales.xlsx\", data_only=True)\nprint(cached.active[\"C2\"].value)              # -> None until Excel saved a result\n",[20,690,691,701,705,718,733,737,758],{"__ignoreMap":42},[46,692,693,695,697,699],{"class":48,"line":49},[46,694,83],{"class":82},[46,696,87],{"class":86},[46,698,90],{"class":82},[46,700,301],{"class":86},[46,702,703],{"class":48,"line":96},[46,704,100],{"emptyLinePlaceholder":99},[46,706,707,710,712,714,716],{"class":48,"line":103},[46,708,709],{"class":86},"formula ",[46,711,109],{"class":82},[46,713,314],{"class":86},[46,715,253],{"class":56},[46,717,256],{"class":86},[46,719,720,722,725,727,730],{"class":48,"line":115},[46,721,262],{"class":203},[46,723,724],{"class":86},"(formula.active[",[46,726,191],{"class":56},[46,728,729],{"class":86},"].value)             ",[46,731,732],{"class":336},"# -> '=B2*10' (the formula text)\n",[46,734,735],{"class":48,"line":126},[46,736,100],{"emptyLinePlaceholder":99},[46,738,739,742,744,746,748,750,752,754,756],{"class":48,"line":137},[46,740,741],{"class":86},"cached ",[46,743,109],{"class":82},[46,745,314],{"class":86},[46,747,253],{"class":56},[46,749,165],{"class":86},[46,751,26],{"class":440},[46,753,109],{"class":82},[46,755,545],{"class":203},[46,757,256],{"class":86},[46,759,760,762,765,767,770],{"class":48,"line":176},[46,761,262],{"class":203},[46,763,764],{"class":86},"(cached.active[",[46,766,191],{"class":56},[46,768,769],{"class":86},"].value)              ",[46,771,772],{"class":336},"# -> None until Excel saved a result\n",[10,774,775,776,778,779,782,783,785,786,789],{},"The catch: openpyxl never evaluates formulas itself. ",[20,777,680],{}," only returns a value if a real spreadsheet application — Excel, LibreOffice, or similar — opened the file, recalculated, and saved the cached results. A workbook that openpyxl created and saved (like our ",[20,780,781],{},"sales.xlsx",") has no cached values, so ",[20,784,680],{}," returns ",[20,787,788],{},"None"," for every formula cell. Open and resave the file in Excel once, and the cached results appear.",[29,791,793],{"id":792},"common-pitfalls","Common pitfalls",[795,796,797,813],"table",{},[798,799,800],"thead",{},[801,802,803,807,810],"tr",{},[804,805,806],"th",{},"Symptom",[804,808,809],{},"Cause",[804,811,812],{},"Fix",[814,815,816,838,858,872,893],"tbody",{},[801,817,818,826,829],{},[819,820,821,822,825],"td",{},"Got a ",[20,823,824],{},"\u003CCell>"," repr, not the value",[819,827,828],{},"Read the cell object, not its data",[819,830,831,832,834,835],{},"Append ",[20,833,280],{},": ",[20,836,837],{},"ws[\"B2\"].value",[801,839,840,849,852],{},[819,841,842,845,846],{},[20,843,844],{},"IndexError"," or wrong cell with ",[20,847,848],{},"cell()",[819,850,851],{},"Used 0-based indices",[819,853,854,855],{},"openpyxl is 1-based; top-left is ",[20,856,857],{},"row=1, column=1",[801,859,860,866,869],{},[819,861,862,785,864],{},[20,863,680],{},[20,865,788],{},[819,867,868],{},"File has no cached formula results",[819,870,871],{},"Open and save the file in Excel first; openpyxl won't compute",[801,873,874,880,883],{},[819,875,876,879],{},[20,877,878],{},"MemoryError"," on a huge file",[819,881,882],{},"Loaded the whole workbook into RAM",[819,884,885,886,889,890],{},"Use ",[20,887,888],{},"load_workbook(path, read_only=True)"," and stream ",[20,891,892],{},"iter_rows",[801,894,895,901,906],{},[819,896,897,898],{},"Edits don't stick after ",[20,899,900],{},"read_only",[819,902,903,905],{},[20,904,900],{}," mode is non-writable",[819,907,559,908,910],{},[20,909,900],{}," when you need to modify cells",[10,912,913,914,916,917,919],{},"A second subtlety: you can't have both the formula text and the cached result from one ",[20,915,22],{}," call. Open the file twice — once plain, once with ",[20,918,680],{}," — if you need both.",[29,921,923],{"id":922},"performance-and-scale","Performance and scale",[10,925,926,927,929,930,932],{},"For large workbooks where you only read, ",[20,928,888],{}," switches openpyxl to a streaming parser that loads rows lazily, keeping memory flat as the file grows. It pairs naturally with ",[20,931,471],{},". Note that read-only mode disables writing and some cell attributes, so use it only for pure extraction.",[29,934,936],{"id":935},"frequently-asked-questions","Frequently asked questions",[10,938,939,942,943,946],{},[380,940,941],{},"Why does my cell return the formula string instead of the number?","\nThat's the default. Reload with ",[20,944,945],{},"load_workbook(path, data_only=True)"," to get the cached result — provided Excel computed and saved it.",[10,948,949,952,953,387,956,959],{},[380,950,951],{},"Is openpyxl 0-based or 1-based?","\n1-based, everywhere. ",[20,954,955],{},"ws.cell(row=1, column=1)",[20,957,958],{},"A1",". This matches the spreadsheet UI but differs from Python list indexing.",[10,961,962,965,966,968,969,971,972,975,976,978],{},[380,963,964],{},"How do I read just the value, not the cell object?","\nAlways go through ",[20,967,280],{}," — ",[20,970,837],{}," or ",[20,973,974],{},"ws.cell(row=2, column=2).value",". ",[20,977,471],{}," does this for you across a whole sweep.",[10,980,981,984],{},[380,982,983],{},"Can openpyxl calculate formulas for me?","\nNo. It reads formula text or the cached result, but never evaluates. For live computation, use a tool that drives Excel itself, such as xlwings.",[29,986,988],{"id":987},"conclusion","Conclusion",[10,990,991,992,994,995,997,998,1000,1001,1003,1004,1006],{},"openpyxl gives you two equivalent ways to reach a cell — ",[20,993,837],{}," for readability and ",[20,996,974],{}," for computed coordinates — both 1-based. To sweep a sheet, ",[20,999,471],{}," is fastest; to scope a region, index with a range string. The one rule to remember about formulas: openpyxl doesn't calculate, so ",[20,1002,680],{}," returns the cached result only when a spreadsheet app saved one, and ",[20,1005,788],{}," otherwise.",[29,1008,1010],{"id":1009},"where-to-go-next","Where to go next",[10,1012,1013,1014,1016,1017,1021,1022,1026],{},"Return to ",[14,1015,17],{"href":16}," for the broader read-and-edit workflow. To write back to a file you've opened, see ",[14,1018,1020],{"href":1019},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fopenpyxl-append-data-to-existing-excel-sheet\u002F","Append Data to an Existing Excel Sheet with openpyxl",". For when to use openpyxl versus a faster write-only engine, read ",[14,1023,1025],{"href":1024},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fopenpyxl-vs-xlsxwriter-vs-pandas-excelwriter\u002F","openpyxl vs xlsxwriter vs pandas.ExcelWriter",".",[1028,1029,1030],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":42,"searchDepth":96,"depth":96,"links":1032},[1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044],{"id":31,"depth":96,"text":32},{"id":63,"depth":96,"text":64},{"id":273,"depth":96,"text":274},{"id":371,"depth":96,"text":372},{"id":464,"depth":96,"text":465},{"id":574,"depth":96,"text":575},{"id":669,"depth":96,"text":670},{"id":792,"depth":96,"text":793},{"id":922,"depth":96,"text":923},{"id":935,"depth":96,"text":936},{"id":987,"depth":96,"text":988},{"id":1009,"depth":96,"text":1010},"Read Excel cell values with openpyxl: load_workbook, ws['B2'].value, ws.cell(), iter_rows, ranges, and data_only for cached formula results instead of formula text.","md",{},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fread-cell-value-from-excel-with-openpyxl",{"title":1050,"description":1051},"Read a Cell Value from Excel with openpyxl","Get cell values in openpyxl via ws['B2'].value and ws.cell(row, column), iterate rows, read ranges, and use data_only to pull cached formula results over formula strings.","getting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fread-cell-value-from-excel-with-openpyxl\u002Findex","jTAY2umBHHhlk4utblHyx5H2XAS5ROPSpNkd6WbFUvg",[1055,1059],{"title":1056,"path":1057,"stem":1058,"children":-1},"openpyxl: Append Data to an Existing Excel Sheet","\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fopenpyxl-append-data-to-existing-excel-sheet","getting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fopenpyxl-append-data-to-existing-excel-sheet\u002Findex",{"title":1060,"path":1061,"stem":1062,"children":-1},"Working with Multiple Excel Sheets in Python","\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-multiple-excel-sheets-in-python","getting-started-with-python-excel-automation\u002Fworking-with-multiple-excel-sheets-in-python\u002Findex",1781773160854]