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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
| <!doctype html>
<html>
<head>
<title>Gestion des donnees logistiques</title>
<HTA:APPLICATION ATTRIBUTX="" ATTRIBUTY="">
<HTA:APPLICATION ICON = "safran.jpg">
<link rel="stylesheet" href="style.css" />
<img src="safran.jpg" alt="Logo du site" id="logo">
<script LANGUAGE=javascript>
function ImportFromXLS_Direct(Ref)
{
var oExcel, Row, nRow, CellA, CellB, CellC, CellD, CellE, j, maxRows;
var Line = 7;
var table = document.getElementById("tableau");
var Ref = document.getElementById("texte").value;
//var Path_file = "D:/Users/s580385/Desktop/HTML/Gestion donnees stock.xlsm";
var Path_file = "C:/temp/toto.xlsx";
// Lancement de EXCEL
oExcel = new ActiveXObject('Excel.Application.16');
oExcel.WorkBooks.Open(Path_file);
// Pour rendre EXCEL visible sinon supprimer la ligne
oExcel.Visible = false;
// Cellule(lignes, colonnes)
var currSheet = oExcel.Sheets(1);
// Suppression des ligne du tableau - hormis les entêtes
var k = table.rows.length;
if (k>1)
{
for(l=k;l>1;l--)
{
table.deleteRow(l-1);
}
}
//maxRows = 6533;
maxRows = 200;
for ( var i = 0 ; i<maxRows ; i++)
{
pct = (((Line + i) / maxRows) * 100);
var Ref1 = currSheet.cells( Line + i, 1).value;
if (Ref1 == Ref )
{
nRow = table.rows.length;
row = table.insertRow(nRow);
CellA = row.insertCell(0);
CellB = row.insertCell(1);
CellC = row.insertCell(2);
CellD = row.insertCell(3);
CellE = row.insertCell(4);
CellA.innerHTML = Ref1;
CellB.innerHTML = currSheet.cells( Line + i, 2).value;
CellC.innerHTML = currSheet.cells( Line + i, 3).value;
CellD.innerHTML = currSheet.cells( Line + i, 4).value;
CellE.innerHTML = currSheet.cells( Line + i, 5).value;
j=j+1;
}
}
Line +=7;
//fermeture de EXCEL sinon supprimer les deux lignes
oExcel.WorkBooks.Close();
oExcel.Quit();
oExcel.Visible = false;
}
</script>
</head>
<BODY bgcolor="green">
<h1> Outils de gestion des stocks </h1>
<br><br>
<p>
<nav>
<ul id ="menu">
<li id = "Analyse des ecarts">
<a href="Gestion stock.hta" title="lien vers les analyses d'écarts" width="111" height="28">Analyse des ecarts</a>
</li>
<li id = "Entrees">
<a href="new 2.html" title="lien vers les analyses Entrées" width="111" height="28">Entrees</a>
</li>
<li id = "Sorties">
<a href="new 3.html" title="lien vers les analyses Entrées" width="111" height="28">Sorties</a>
</li>
<li id = "Analyse des Consomations">
<a href="new 4.html" title="lien vers les analyses Entrées" width="111" height="28">Analyse des Consomations</a>
</li>
</ul>
</nav>
</p>
<br><br><br>
<p id = "Barre de test" style = "text-decoration:underline">
Veuillez selectionner des filtres :
</p>
Reference :
<label for="recherche-texte"><input id="texte" name="q" placeholder="reference" value="" title="recherche" type="text" onfocus="if(value=='recherche') this.value='';"></label>
<br>
Numero de lot :
<label for="recherche-texte"><input id="recherche-texte" name="q" placeholder="reference" value="" title="recherche" type="text" onfocus="if(value=='recherche') this.value='';"></label>
<br>
Numero de semaine :
<label for="recherche-texte"><input id="recherche-texte" name="q" placeholder="reference" value="" title="recherche" type="text" onfocus="if(value=='recherche') this.value='';"></label>
<br>
<button id="button1" onclick="ImportFromXLS_Direct()">
Importer les donnees
</button>
<table id = "tableau">
<tr>
<th>Reference</th>
<th>Quantité</th>
<th>Jour</th>
<th>Mois</th>
<th>Année</th>
</tr>
</table>
</BODY>
</HTML> |
Partager