HTML XML créé un chiffrier Excel avec plusieurs onglets

Bonjour tout le monde

Je dois créer un HTML et ou XML qui sera utilisé pour charger des données dans un chiffrier excel 2000 contenant plusieurs onglets.

Le code suivant permet de créer 2 onglets (data1, data2) mais les données sont tous chargées dans l'onglets (data1).

Ma question est: pourquoi les données (S2_R1_C1 ... ) ne sont pas dans l'onglet (data2)

Voici le code.

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=ProgId content=Excel.Sheet>
  <meta name=Generator content="Microsoft Excel 9">
</head>

<body link=blue vlink=purple>

<!-- Creation of 2 worksheets ( data1 and data2 ) -->
<xml>
 <x:ExcelWorkbook>
  <x:ActiveSheet>0</x:ActiveSheet>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>data1</x:Name>
    <x:WorksheetOptions>
     <x:Selected/>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
   <x:ExcelWorksheet>
      <x:Name>data2</x:Name>
      <x:WorksheetOptions>
        <x:Selected/>
        <x:ProtectContents>False</x:ProtectContents>
        <x:ProtectObjects>False</x:ProtectObjects>
        <x:ProtectScenarios>False</x:ProtectScenarios>
      </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml>

<!-- Fill up the first worksheet -->
<table x:str border=0 cellpadding=0 cellspacing=0 width=128 style='border-collapse:
 collapse;table-layout:fixed;width:96pt'>
 <col width=64 span=2 style='width:48pt'>
 <tr height=17 style='height:12.75pt'>
  <td height=17 width=64 style='height:12.75pt;width:48pt'>S1_R1_C1</td>
  <td width=64 style='width:48pt'>S1_R1_C2</td>
  <td width=64 style='width:48pt'>S1_R1_C3</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 width=64 style='height:12.75pt;width:48pt'>S1_R2_C1</td>
  <td width=64 style='width:48pt'>S1_R2_C2</td>
  <td width=64 style='width:48pt'>S1_R2_C3</td>
 </tr>
</table>

<!-- Should activate the second worksheet -->
<xml>
 <x:ExcelWorkbook>
   <x:ActiveSheet>1</x:ActiveSheet>
 </x:ExcelWorkbook>
</xml>

<!-- Should fillup the second worksheet -->
<table x:str border=0 cellpadding=0 cellspacing=0 width=128 style='border-collapse:
 collapse;table-layout:fixed;width:96pt'>
 <col width=64 span=2 style='width:48pt'>
 <tr height=17 style='height:12.75pt'>
  <td height=17 width=64 style='height:12.75pt;width:48pt'>S2_R1_C1</td>
  <td width=64 style='width:48pt'>S2_R1_C2</td>
  <td width=64 style='width:48pt'>S2_R1_C3</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 style='height:12.75pt'>S2_R2_C1</td>
  <td>S2_R2_C2</td>
 </tr>
</table>

</body>
</html>

Donc je dois créer un fichier qui sera chargé dans Excel 2000 et qui me permettera de charger des données dans au moin 2 onglets different.

Merci de votre aide.

Daniel

Rechercher des sujets similaires à "html xml cree chiffrier onglets"