IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

XSL/XSLT/XPATH XML Discussion :

[SpreadsheetML][XSLT] Quelle méthode pour alimenter une Base MySQL ?


Sujet :

XSL/XSLT/XPATH XML

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Février 2007
    Messages
    24
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Février 2007
    Messages : 24
    Par défaut [SpreadsheetML][XSLT] Quelle méthode pour alimenter une Base MySQL ?
    Bonjour

    J’espère que j’ai posté dans le bon endroit,
    donc je vais expliquer la situation.

    Je reçois par mail tout les mois un fichier Excel, et dans ce fichier je dois récupérer une centaine de valeur que je dois mettre dans une base de données MySql.

    Donc je me suis dit que je pouvais sûrement le faire automatiquement par un scripte PHP, je gagnerais tout les mois au moins deux heurs c’est beau la vie. (Mais 2x12 sa fais un jour )

    Pour la solution : je cherche à savoir si la méthode que j’utilise est la bonne, parce que je ne connais pas bien le XML.je suis plutôt NB

    Je pensais à procéder comme ce si. (Mais le problème est que je mie perd).

    Déjà quand je reçois le fichier en Excel.

    Je l’enregistre en XML, pour la lecture des valeurs je pense que c’est beaucoup plus facile.
    je pense que je suis dans la bonne vois .

    En suite, le system ou je dois rajouter les valeurs est en PHP4.
    Déjà la j’ai commencé à pleurer parce que j’ai lu dans certain site que le Simple XML PHP5 était beaucoup plus facile a utiliser

    Donc j’ai regardé comment parser un fichier XML en PHP j’ai finit par trouver des commande un peut blizzard mais j’ai finit par trouver.

    J’ai finalement réussi à obtenir un grand mais un grand tableau.
    Donc je disais que j’avais réussi a mettre tout le XML dans un tableau, mais la je ne sais pas comment vous le dire mais un tableau chez tableau.

    La je voulais savoir si je vais dans le bon chemin ? et biensure un petit coup de main please.


    Donc la situation ou je me trouve est que je suis entrain de parcoure un tableau qui es énormes. un truc de fou

    Je vais vous montrer un peux ce que j’ai :
    le fichier XML
    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
    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
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    <?xml version="1.0"?>
    <?mso-application progid="Excel.Sheet"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
     xmlns:o="urn:schemas-microsoft-com:office:office"
     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">
      <LastAuthor>WindowsXP</LastAuthor>
      <LastPrinted>2004-08-09T12:43:55Z</LastPrinted>
      <Created>2004-05-12T08:29:22Z</Created>
      <LastSaved>2007-04-02T13:39:00Z</LastSaved>
      <Version>11.6568</Version>
     </DocumentProperties>
     <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
      <Colors>
       <Color>
        <Index>16</Index>
        <RGB>#8080FF</RGB>
       </Color>
       <Color>
        <Index>17</Index>
        <RGB>#802060</RGB>
       </Color>
       <Color>
        <Index>18</Index>
        <RGB>#FFFFC0</RGB>
       </Color>
       <Color>
        <Index>19</Index>
        <RGB>#A0E0E0</RGB>
       </Color>
       <Color>
        <Index>20</Index>
        <RGB>#600080</RGB>
       </Color>
       <Color>
        <Index>22</Index>
        <RGB>#0080C0</RGB>
       </Color>
       <Color>
        <Index>23</Index>
        <RGB>#C0C0FF</RGB>
       </Color>
       <Color>
        <Index>33</Index>
        <RGB>#69FFFF</RGB>
       </Color>
       <Color>
        <Index>36</Index>
        <RGB>#A6CAF0</RGB>
       </Color>
       <Color>
        <Index>37</Index>
        <RGB>#CC9CCC</RGB>
       </Color>
       <Color>
        <Index>39</Index>
        <RGB>#E3E3E3</RGB>
       </Color>
       <Color>
        <Index>42</Index>
        <RGB>#339933</RGB>
       </Color>
       <Color>
        <Index>43</Index>
        <RGB>#999933</RGB>
       </Color>
       <Color>
        <Index>44</Index>
        <RGB>#996633</RGB>
       </Color>
       <Color>
        <Index>45</Index>
        <RGB>#996666</RGB>
       </Color>
       <Color>
        <Index>48</Index>
        <RGB>#3333CC</RGB>
       </Color>
       <Color>
        <Index>49</Index>
        <RGB>#336666</RGB>
       </Color>
       <Color>
        <Index>52</Index>
        <RGB>#663300</RGB>
       </Color>
       <Color>
        <Index>55</Index>
        <RGB>#424242</RGB>
       </Color>
      </Colors>
     </OfficeDocumentSettings>
     <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
      <WindowHeight>4590</WindowHeight>
      <WindowWidth>15330</WindowWidth>
      <WindowTopX>0</WindowTopX>
      <WindowTopY>3270</WindowTopY>
      <TabRatio>207</TabRatio>
      <AcceptLabelsInFormulas/>
      <ProtectStructure>False</ProtectStructure>
      <ProtectWindows>False</ProtectWindows>
     </ExcelWorkbook>
     <Styles>
      <Style ss:ID="Default" ss:Name="Normal">
       <Alignment ss:Vertical="Bottom"/>
       <Borders/>
       <Font ss:FontName="MS Sans Serif" ss:Color="#000000"/>
       <Interior/>
       <NumberFormat/>
       <Protection/>
      </Style>
      <Style ss:ID="s16" ss:Name="Milliers">
       <NumberFormat ss:Format="_(* #,##0.00_);_(* \(#,##0.00\);_(* &quot;-&quot;??_);_(@_)"/>
      </Style>
      <Style ss:ID="s20" ss:Name="Pourcentage">
       <NumberFormat ss:Format="0%"/>
      </Style>
      <Style ss:ID="s21">
       <Font ss:FontName="MS Sans Serif" ss:Size="8" ss:Color="#000000"/>
      </Style>
      <Style ss:ID="s22">
       <Alignment ss:Horizontal="Left" ss:Vertical="Center"/>
       <Borders/>
       <Font ss:FontName="Times New Roman" x:Family="Roman" ss:Color="#FF0000"/>
       <Interior/>
      </Style>
      <Style ss:ID="s23">
       <Alignment ss:Horizontal="Right" ss:Vertical="Center"/>
       <Borders/>
       <Font ss:FontName="Times New Roman" x:Family="Roman" ss:Size="20"
        ss:Color="#FF0000"/>
       <Interior/>
      </Style>
      <Style ss:ID="s24">
       <Font ss:FontName="MS Sans Serif" ss:Size="7" ss:Color="#000000"/>
      </Style>
      <Style ss:ID="s25">
       <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
       <Borders/>
       <Font x:Family="Swiss" ss:Size="7" ss:Color="#FFFFFF" ss:Bold="1"/>
       <Interior ss:Color="#808080" ss:Pattern="Solid"/>
      </Style>
      <Style ss:ID="s26">
       <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
       <Borders>
        <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
        <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
       </Borders>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
      </Style>
      <Style ss:ID="s28" ss:Parent="s20">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders>
        <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
       </Borders>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
       <NumberFormat ss:Format="Percent"/>
      </Style>
      <Style ss:ID="s30" ss:Parent="s16">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders/>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
       <NumberFormat ss:Format="Standard"/>
      </Style>
      <Style ss:ID="s31">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders>
        <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
        <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
       </Borders>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
      </Style>
      <Style ss:ID="s32">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders>
        <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
        <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
       </Borders>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
       <NumberFormat ss:Format="0.00%;\(0.00%\)"/>
      </Style>
      <Style ss:ID="s33">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders>
        <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
        <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"
         ss:Color="#FF0000"/>
       </Borders>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
       <NumberFormat ss:Format="Fixed"/>
      </Style>
      <Style ss:ID="s34">
       <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
       <Borders/>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
      </Style>
      <Style ss:ID="s35" ss:Parent="s20">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders/>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
       <NumberFormat ss:Format="Percent"/>
      </Style>
      <Style ss:ID="s36">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders/>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
      </Style>
      <Style ss:ID="s37">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders/>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
       <NumberFormat ss:Format="0.00%;\(0.00%\)"/>
      </Style>
      <Style ss:ID="s38">
       <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
       <Borders/>
       <Font x:Family="Swiss" ss:Size="7"/>
       <Interior/>
       <NumberFormat ss:Format="Fixed"/>
      </Style>
      <Style ss:ID="s39">
       <Borders/>
       <Font ss:FontName="MS Sans Serif" ss:Size="8" ss:Color="#000000"/>
      </Style>
     </Styles>
     <Worksheet ss:Name="Data">
      <Names>
       <NamedRange ss:Name="Print_Titles" ss:RefersTo="=Data!R1:R3"/>
      </Names>
      <Table ss:ExpandedColumnCount="256" ss:ExpandedRowCount="581" x:FullColumns="1"
       x:FullRows="1" ss:StyleID="s21" ss:DefaultColumnWidth="60"
       ss:DefaultRowHeight="10.5">
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="184.5"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="30"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="32.25"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="29.25"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="38.25"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="36"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="34.5" ss:Span="1"/>
       <Column ss:Index="9" ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="47.25"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="168"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="29.25"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="36.75"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="57"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="36.75"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="44.25"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="39.75"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="41.25"/>
       <Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="48" ss:Span="238"/>
       <Row ss:AutoFitHeight="0" ss:Height="26.25">
        <Cell ss:Index="2" ss:StyleID="s22"><Data ss:Type="String">As of March 29, 2007</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:Index="14" ss:StyleID="s23"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s23"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s23"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s23"><Data ss:Type="String">HSBC Private Bank Funds   </Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
       </Row>
       <Row ss:AutoFitHeight="0" ss:Height="9" ss:StyleID="s24">
        <Cell ss:StyleID="s25"><Data ss:Type="String">Investment Funds</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Launch</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Liquidity</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Date</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Mtd</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Ytd</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Last</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Last</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Last</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Manager</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Asset</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Asset</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Annual Return</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Vol</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Date</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Date</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">MaxDD</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
       </Row>
       <Row ss:AutoFitHeight="0" ss:Height="9" ss:StyleID="s24">
        <Cell ss:StyleID="s25"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Date</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">NAV</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Month N</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Month Date</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Size</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">Size Date</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">since inception</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><NamedCell ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">StartDD</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><Data ss:Type="String">MaxDD</Data><NamedCell
          ss:Name="Print_Titles"/></Cell>
        <Cell ss:StyleID="s25"><NamedCell ss:Name="Print_Titles"/></Cell>
       </Row>
       <Row>
        <Cell ss:StyleID="s26"><Data ss:Type="String">32 CAPITAL FUND, LTD (THE) - A/1</Data></Cell>
        <Cell ss:StyleID="s28"><Data ss:Type="String">7/31/2002</Data></Cell>
        <Cell ss:StyleID="s30"><Data ss:Type="String">Y / M</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">3/23/2007</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="Number">7.3600000000000002E-3</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="Number">2.0478E-2</Data></Cell>
        <Cell ss:StyleID="s33"><Data ss:Type="Number">1488.0603000000001</Data></Cell>
        <Cell ss:StyleID="s33"><Data ss:Type="Number">1477.1882000000001</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">2/28/2007</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">Barclays Global Investors, N.A.</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">$1'931 M</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">Feb 07</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="String">8.93%</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="String">4.64%</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">2/28/2003</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">8/31/2003</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="Number">-5.5157648474377902E-2</Data></Cell>
       </Row>
       <Row>
        <Cell ss:StyleID="s26"><Data ss:Type="String">788 CHINA FUND LTD</Data></Cell>
        <Cell ss:StyleID="s28"><Data ss:Type="String">4/30/2005</Data></Cell>
        <Cell ss:StyleID="s30"><Data ss:Type="String">M</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">2/28/2007</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="Number">-2.8216999999999999E-2</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="Number">-7.3299999999999997E-3</Data></Cell>
        <Cell ss:StyleID="s33"><Data ss:Type="Number">139.48</Data></Cell>
        <Cell ss:StyleID="s33"><Data ss:Type="Number">143.53</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">1/31/2007</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">Jacques Mechelany &amp; Michel Artaud</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">$46 M</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">Jan 07</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="String">19.91%</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="String">17.40%</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">7/31/2005</Data></Cell>
        <Cell ss:StyleID="s31"><Data ss:Type="String">10/31/2005</Data></Cell>
        <Cell ss:StyleID="s32"><Data ss:Type="Number">-0.12699571207006699</Data></Cell>
       </Row>
    voila le tableau que j'ai , mais j'ai deja descendu de quatre niveau.
    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
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    
     [21] => Array
            (
                [name] => ROW
                [content] =>                                                                        
                [child] => Array
                    (
                        [0] => Array
                            (
                                [name] => CELL
                                [attrs] => Array
                                    (
                                        [SS:STYLEID] => s26
                                    )
    
                                [child] => Array
                                    (
                                        [0] => Array
                                            (
                                                [name] => DATA
                                                [attrs] => Array
                                                    (
                                                        [SS:TYPE] => String
                                                    )
    
                                                [content] => 788 CHINA FUND LTD
                                            )
    
                                    )
    
                            )
    
                        [1] => Array
                            (
                                [name] => CELL
                                [attrs] => Array
                                    (
                                        [SS:STYLEID] => s28
                                    )
    
                                [child] => Array
                                    (
                                        [0] => Array
                                            (
                                                [name] => DATA
                                                [attrs] => Array
                                                    (
                                                        [SS:TYPE] => String
                                                    )
    
                                                [content] => 4/30/2005
                                            )
    
                                    )
    
                            )
    
                        [2] => Array
                            (
                                [name] => CELL
                                [attrs] => Array
                                    (
                                        [SS:STYLEID] => s30
                                    )
    
                                [child] => Array
                                    (
                                        [0] => Array
                                            (
                                                [name] => DATA
                                                [attrs] => Array
                                                    (
                                                        [SS:TYPE] => String
                                                    )
    
                                                [content] => M
                                            )
    
                                    )
    
                            )
    
                        [3] => Array
                            (
                                [name] => CELL
                                [attrs] => Array
                                    (
                                        [SS:STYLEID] => s31
                                    )
    
                                [child] => Array
                                    (
                                        [0] => Array
                                            (
                                                [name] => DATA
                                                [attrs] => Array
                                                    (
                                                        [SS:TYPE] => String
                                                    )
    
                                                [content] => 2/28/2007
                                            )
    
                                    )
    
                            )
    voila moi il faudrait les valeur en rouge.

    est-ce que serais possible de faire une fonction récursive ?

  2. #2
    Membre éclairé Avatar de femtosa
    Inscrit en
    Juin 2002
    Messages
    253
    Détails du profil
    Informations forums :
    Inscription : Juin 2002
    Messages : 253
    Par défaut
    Salut

    As-tu pensé enregistrer au format .csv ... ?
    Comment se présente ton fichier .xls ?

    Ton raisonnement me paraît être une solution pas trop mauvaise ( ), mais apparemment tu ne souhaites vraiment qu'une information parmis beaucoup, et c'est vrai que ce que tu obtiens est lourd pour ce que tu en fais

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Février 2007
    Messages
    24
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Février 2007
    Messages : 24
    Par défaut je deprime
    Salut,

    Mon fichier ce présent en XSL il es suivie de 16 colonne envieront et 600 ligne envieront

    Donc si je le fais manuellement, je dois chercher le nom dans la première colonne ensuite après prendre des valeurs dans les colonnes 4 et 5 (exemple). (bien entendu sur la même ligne).

    J’espère que tu vois ce que je veux dire

    Pour le CVS, j’ai pensé mais je me suis dit que c’était plus propres de le faire en XML parce c’est standard.

    une petit question, n'est-il pas possible de parcourir un XML mais sans le mettre dans un tableau?

  4. #4
    Expert confirmé
    Avatar de GrandFather
    Inscrit en
    Mai 2004
    Messages
    4 587
    Détails du profil
    Informations personnelles :
    Âge : 55

    Informations forums :
    Inscription : Mai 2004
    Messages : 4 587
    Par défaut
    Bonjour,

    la solution qui me semble la plus viable est de passer par du code XSLT pour extraire les données qui t'intéressent et générer en sortie le script SQL qui va directement t'enregistrer les données en base. Je ne vois pas l'intérêt de passer par PHP pour un besoin aussi ponctuel, autant passer par la ligne de commande pour lancer la transformation par XSLT puis l'exécution du script SQL.
    FAQ XML
    ------------
    « Le moyen le plus sûr de cacher aux autres les limites de son savoir est de ne jamais les dépasser »
    Giacomo Leopardi

  5. #5
    Membre éclairé Avatar de femtosa
    Inscrit en
    Juin 2002
    Messages
    253
    Détails du profil
    Informations forums :
    Inscription : Juin 2002
    Messages : 253
    Par défaut
    Effectivement cette solutions paraît la plus appropriée !

    Cependant si tu tiens absolument à faire du code PHP, regarde les différents parseurs qu'il existe (un aperçu ici) et choisi un parseur plutôt basé sur SAX .

    Bon développement

  6. #6
    Expert confirmé
    Avatar de GrandFather
    Inscrit en
    Mai 2004
    Messages
    4 587
    Détails du profil
    Informations personnelles :
    Âge : 55

    Informations forums :
    Inscription : Mai 2004
    Messages : 4 587
    Par défaut
    Citation Envoyé par femtosa
    Cependant si tu tiens absolument à faire du code PHP, regarde les différents parseurs qu'il existe (un aperçu ici) et choisi un parseur plutôt basé sur SAX .
    D'après ce que j'ai compris il veut récupérer les informations contenues dans certaines balises <data>, pas dans toutes, celà semble dépendre du contexte. Pour gérer cela avec SAX, ça va être difficile. Il vaudrait mieux utiliser DOM & XPath, mais alors c'est PHP 5 obligatoire.
    FAQ XML
    ------------
    « Le moyen le plus sûr de cacher aux autres les limites de son savoir est de ne jamais les dépasser »
    Giacomo Leopardi

Discussions similaires

  1. Réponses: 7
    Dernier message: 18/02/2008, 14h33
  2. Réponses: 5
    Dernier message: 03/01/2008, 16h07
  3. Quelles solutions pour créer une Bases de données géographiques ?
    Par subzero82 dans le forum Décisions SGBD
    Réponses: 1
    Dernier message: 25/11/2007, 21h45
  4. Réponses: 5
    Dernier message: 24/03/2007, 15h00
  5. Réponses: 11
    Dernier message: 29/06/2005, 17h55

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo