Bonjour,
j'aimerai creer un tableau excel avec 2 colonnes , c simple bien sure, mais malheureusement que j'arrive pas a faire.
mon programme lit depuis un fichier word et ecrit dans un ficheir excel.
la transformation passe bien mais quand je veux ouvrir le fichier excel resultat il me sort une erreure.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
 
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
 
 
    <Workbook xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
	xmlns:v="urn:schemas-microsoft-com:vml"
	xmlns:w10="urn:schemas-microsoft-com:office:word"
	xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
	xmlns:aml="http://schemas.microsoft.com/aml/2001/core" 
	xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
	xmlns:o="urn:schemas-microsoft-com:office:office"
	xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" 
	xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" 
	xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
	xmlns="urn:schemas-microsoft-com:office:spreadsheet"
     xmlns:x="urn:schemas-microsoft-com:office:excel"
     xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
     xmlns:html="http://www.w3.org/TR/REC-html40"
	>
 
     <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
      <Author>aharrathi</Author>
      <Created>2011-04-27T18:21:48Z</Created>
      <Version>1.00</Version>
     </DocumentProperties>
     <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
      <WindowHeight>8895</WindowHeight>
      <WindowWidth>18015</WindowWidth>
      <WindowTopX>0</WindowTopX>
      <WindowTopY>105</WindowTopY>
      <ProtectStructure>False</ProtectStructure>
      <ProtectWindows>False</ProtectWindows>
     </ExcelWorkbook>
     <Styles>
      <Style ss:ID="Default" ss:Name="Normal">
       <Alignment ss:Vertical="Bottom"/>
       <Borders/>
       <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
       <Interior/>
       <NumberFormat/>
       <Protection/>
      </Style>
     </Styles>
     <Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="256" ss:ExpandedRowCount="2000" ss:StyleID="s21" x:FullColumns="1" x:FullRows="1" ss:DefaultColumnWidth="54" ss:DefaultRowHeight="14.25">
 
		   <Row>
			   <Cell>
			     <Data ss:Type="String">premiere production</Data>
			   </Cell>
		   </Row>
		   <xsl:for-each select="//w:hlink">                                               
			   <Row> 
				 <Cell>
                        <Data ss:Type="String">
                      <xsl:value-of select="@w:bookmark" />  
                        </Data>
                  </Cell>
				</Row> 
					<Row>
                    <Cell>
                        <Data ss:Type="String">
                           <xsl:value-of select=".//w:t" />
                        </Data> 
                    </Cell>	
                </Row>
            </xsl:for-each>
 
      </Table>
      <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
       <PageSetup>
        <Header x:Margin="0.3"/>
        <Footer x:Margin="0.3"/>
        <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
       </PageSetup>
       <Selected/>
       <Panes>
        <Pane>
         <Number>3</Number>
         <ActiveRow>1</ActiveRow>
        </Pane>
       </Panes>
       <ProtectObjects>False</ProtectObjects>
       <ProtectScenarios>False</ProtectScenarios>
      </WorksheetOptions>
     </Worksheet>
    </Workbook>
 
</xsl:template>
</xsl:stylesheet>
le pb c dans ce bout de code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<Row> 
				 <Cell>
                        <Data ss:Type="String">
                      <xsl:value-of select="@w:bookmark" />  
                        </Data>
                  </Cell>
				</Row> 
				<Row>
                    <Cell>
                        <Data ss:Type="String">
                           <xsl:value-of select=".//w:t" />
                        </Data> 
                    </Cell>	
                </Row>
si je choisit une seule cellule parmis les deux ça fonctionne mais les 2 nn.
le pire c que je trouve pas des tutos pour apprendre comment faire un tableau XlS.si vous connais merci de me renseigner.
merci