Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> przetwazanie pliku XML
-Guest-
post
Post #1





Goście







chce przetwozyc plik XML a dkoladnie generowany przez Excel wiec wczytuje go przez simplexml i che sie dobrac do atrybutow ale maja one taka postac:
Kod
<Table ss:ExpandedColumnCount="3" ss:ExpandedRowCount="4" x:FullColumns="1"
   x:FullRows="1">
   <Row>
    <Cell><Data ss:Type="String">kolumna1</Data></Cell>
    <Cell ss:MergeAcross="1"><Data ss:Type="String">kolumna2_zlacz</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">aaa</Data></Cell>
    <Cell><Data ss:Type="String">bbbb</Data></Cell>
    <Cell><Data ss:Type="String">ccc</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">SSS</Data></Cell>
    <Cell><Data ss:Type="String">SWE</Data></Cell>
    <Cell><Data ss:Type="String">TEST</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">asas</Data></Cell>
    <Cell><Data ss:Type="String">adad</Data></Cell>
    <Cell><Data ss:Type="String">afaf</Data></Cell>
   </Row>
  </Table>


nie wiem jak sie dobrac do ss:ExpandedColumnCount
  1. <?php
  2. $xml = simplexml_load_file('test.xml');
  3. echo $xml->Table['ExpandedColumnCount'];
  4.  
  5. ?>
to cos takiego nie dziala (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) jak dam $xml->Table['ss:ExpandedColumnCount']; to tez nie (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) wiec jak mam sie do tego dobrac?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
-Guest-
post
Post #2





Goście







dzieki dr_bonzo dziala (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

zapewne sie domyslacie po co to robie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) bo chce w latwy sposob prezentowac arkusze zrobione w Excelu lub OpenOffice Calc na strocnie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) narazie mam bardzo prototypowy skrypt ale potrafi paczyc komorki oraz wiersze oraz formatowac komorki (tlo, czcionka, polozenie textu) moze juz sa jakies gotowe komponenty do tego jakas klasa albo cos (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

jesli nie moge zaprezentowac to co mam (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 14:25