<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.squi.fr/index.php?action=history&amp;feed=atom&amp;title=Python_%3A_Fichiers_Excel</id>
	<title>Python : Fichiers Excel - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.squi.fr/index.php?action=history&amp;feed=atom&amp;title=Python_%3A_Fichiers_Excel"/>
	<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Python_:_Fichiers_Excel&amp;action=history"/>
	<updated>2026-04-28T01:34:22Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Python_:_Fichiers_Excel&amp;diff=1669&amp;oldid=prev</id>
		<title>Justine : Page créée avec « = OpenPyXl =  Cette lib permet de lire les fichiers excel assez facilement.  &lt;source lang=&quot;python&quot;&gt; #!/usr/bin/env python3 #coding: utf-8 import openpyxl  #Charge le chemi... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Python_:_Fichiers_Excel&amp;diff=1669&amp;oldid=prev"/>
		<updated>2021-05-20T13:54:21Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « = OpenPyXl =  Cette lib permet de lire les fichiers excel assez facilement.  &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt; #!/usr/bin/env python3 #coding: utf-8 import openpyxl  #Charge le chemi... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= OpenPyXl =&lt;br /&gt;
&lt;br /&gt;
Cette lib permet de lire les fichiers excel assez facilement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python3&lt;br /&gt;
#coding: utf-8&lt;br /&gt;
import openpyxl&lt;br /&gt;
&lt;br /&gt;
#Charge le chemin du fichier -_-&amp;#039;&lt;br /&gt;
excelfile = Path(&amp;#039;.&amp;#039;, &amp;#039;triage-lvg.xlsx&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
#Charge le workbook (assemblage de worksheets, un fichier excel ayant plusieurs pages)&lt;br /&gt;
wb_obj = openpyxl.load_workbook(excelfile)&lt;br /&gt;
&lt;br /&gt;
#Charge la sheet&lt;br /&gt;
sheet = wb_obj.active&lt;br /&gt;
&lt;br /&gt;
#Affiche le nom de la sheet&lt;br /&gt;
print(sheet)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#Afficher le contenu&lt;br /&gt;
for row in sheet.iter_rows(max_row=sheet.max_row):&lt;br /&gt;
    for cell in row:&lt;br /&gt;
        print(cell.value, end=&amp;quot; &amp;quot;)&lt;br /&gt;
    print()&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
#Fichier excel vers dictionnaire&lt;br /&gt;
content = {}&lt;br /&gt;
i = 0&lt;br /&gt;
&lt;br /&gt;
for row in sheet.iter_rows(max_row=sheet.max_row):&lt;br /&gt;
    content[i] = []&lt;br /&gt;
    for cell in row:&lt;br /&gt;
        content[i].append(cell.value)&lt;br /&gt;
    i += 1&lt;br /&gt;
&lt;br /&gt;
for j in content.keys():&lt;br /&gt;
    print(content[j])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
</feed>