It's better when it's simple

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revision
tips:xls2wiki [2010-09-26 07:40] [Installation]
tips:xls2wiki [2017-10-20 08:26]
Line 196: Line 196:
 </head> </head>
- <?+ <?php
  $s = $_POST['s'];  $s = $_POST['s'];
  $fromto = $_POST['fromto'];  $fromto = $_POST['fromto'];
Line 214: Line 214:
  $arrayS = preg_split ("/[\n,]+/", $s);  $arrayS = preg_split ("/[\n,]+/", $s);
  $nb_lines = count ($arrayS)-1;  $nb_lines = count ($arrayS)-1;
- $s = $s . $nb_lignes;+ $s = $s . $nb_lines;
  $s = "";  $s = "";
  foreach ( $arrayS as $key => $lines ){  foreach ( $arrayS as $key => $lines ){
Line 244: Line 244:
 Скопируйте и вcтавьте таблицу из Excel или Wiki и нажмите [Convert!] (конвертировать) Скопируйте и вcтавьте таблицу из Excel или Wiki и нажмите [Convert!] (конвертировать)
  <form method=POST action="">  <form method=POST action="">
- <input type="radio" name="fromto" value="E2W" checked>Excel Â» Wiki<br> + <input type="radio" name="fromto" value="E2W" checked>Excel Wiki<br> 
- <input type="radio" name="fromto" value="W2E">Wiki Â» Excel<br>+ <input type="radio" name="fromto" value="W2E">Wiki Excel<br>
  <INPUT TYPE=SUBMIT VALUE="Convert!"><br/>   <INPUT TYPE=SUBMIT VALUE="Convert!"><br/> 
- <textarea id="txt1" name="s" wrap="off" cols=50 rows=50 style="width:400; height:450"><? echo $s?></textarea>+ <textarea id="txt1" name="s" wrap="off" cols=50 rows=50 style="width:400; height:450"><?=$s ?></textarea>
  </form>  </form>
 <span style="font-size:80%"> <span style="font-size:80%">
Line 260: Line 260:
 </code> </code>
 +There is a spell mistake here...
 +$nb_lines = count ($arrayS)-1;
 +$s = $s . $nb_lignes;
 +nb_lignes should be **nb_lines**.
 ===== Installation ===== ===== Installation =====
Line 307: Line 316:
 -Theo -Theo
 +@theo: It's a "new" setting in current php versions which disables the php short tags, so you either have to replace the: <code><?</code> with: <code><?php</code> in the php script, **or** in your php.ini set the following parameter: <code>short_open_tag = on</code>
 +Changing the ini files worked for me - you also need to restart your Apache server before it will work. --- [[user>gymnophoria|gymnophoria]] //2013/01/10 16:58//
tips/xls2wiki.txt · Last modified: 2020-05-20 22:20 by gero-gothe