tips:xls2wiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:xls2wiki [2009-10-20 09:17] – 194.248.13.254 | tips:xls2wiki [2024-01-31 20:26] (current) – 69.11.54.89 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== xls2wiki ====== | ====== xls2wiki ====== | ||
- | ~~UP~~ | + | |
===== Abstract ===== | ===== Abstract ===== | ||
- | This is a simple script that converts copied data from xls to DokuWiki' | + | This is a simple script that converts copied data from xls to DokuWiki' |
Just copy cells in Excel and paste it, then press ' | Just copy cells in Excel and paste it, then press ' | ||
Line 10: | Line 10: | ||
===== code ===== | ===== code ===== | ||
- | <code php> | + | < |
<?php header(" | <?php header(" | ||
< | < | ||
Line 92: | Line 92: | ||
< | < | ||
Copy and paste your Excel or Wiki table below and press [Convert!]< | Copy and paste your Excel or Wiki table below and press [Convert!]< | ||
- | Скопируйте и вÑтавьте таблицу из | + | Скопируйте и вставьте таблицу из |
<form method=POST action=""> | <form method=POST action=""> | ||
<input type=" | <input type=" | ||
Line 109: | Line 109: | ||
</ | </ | ||
</ | </ | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
===== Comments Support Wiki header on first Line ===== | ===== Comments Support Wiki header on first Line ===== | ||
- | I have find this script | + | I have find this script |
- | I would like just to add this lines to put the first line like an header :\\ | + | I would like just to add this lines to put the first line like an header:\\ |
<code php> | <code php> | ||
Line 143: | Line 137: | ||
</ | </ | ||
- | finaly the code with english / french / russian translation, \\ | + | > This converts cell contents like ", " |
- | empty cells stay empty (no " . "), first line become header | + | |
- | <code php> | + | Finally, the code with English / French / Russian translations, |
+ | empty cells stay empty (no " . "), first line become header: | ||
+ | |||
+ | < | ||
<?php header(" | <?php header(" | ||
Line 200: | Line 196: | ||
</ | </ | ||
- | <? | + | <?php |
$s = $_POST[' | $s = $_POST[' | ||
$fromto = $_POST[' | $fromto = $_POST[' | ||
Line 218: | Line 214: | ||
$arrayS = preg_split ("/ | $arrayS = preg_split ("/ | ||
$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 246: | Line 242: | ||
Copy and paste your Excel or Wiki table below and press [Convert!]< | Copy and paste your Excel or Wiki table below and press [Convert!]< | ||
Copier et coller votre Table Excel ou Wiki dans le cadre ci-dessous et cliquez sur [Convert!]< | Copier et coller votre Table Excel ou Wiki dans le cadre ci-dessous et cliquez sur [Convert!]< | ||
- | Скопируйте и вÑтавьте таблицу из | + | Скопируйте и вcтавьте таблицу из Excel или |
<form method=POST action=""> | <form method=POST action=""> | ||
- | <input type=" | + | <input type=" |
- | <input type=" | + | <input type=" |
<INPUT TYPE=SUBMIT VALUE=" | <INPUT TYPE=SUBMIT VALUE=" | ||
- | < | + | < |
</ | </ | ||
<span style=" | <span style=" | ||
Line 265: | Line 261: | ||
</ | </ | ||
+ | There is a spell mistake here... | ||
+ | < | ||
+ | $nb_lines = count ($arrayS)-1; | ||
+ | $s = $s . $nb_lignes; | ||
+ | </ | ||
+ | |||
+ | nb_lignes should be **nb_lines**. | ||
Line 271: | Line 274: | ||
:?: Please forgive such a n00b question, but how does one install this helpful Trick? | :?: Please forgive such a n00b question, but how does one install this helpful Trick? | ||
- | My n00b answer : | + | My n00b answer: |
use iframe.... | use iframe.... | ||
- | create a php page somewhere into your website | + | create a PHP page somewhere into your website |
- | Use iframe to include this php page into a wiki page. | + | Use iframe to include this PHP page into a wiki page. |
- | Look to this plugins if you hate html :/ | + | Look to this plugins if you hate HTML: [[plugin: |
- | you can **not** try to include directly the code in a wiki page either : | + | You can **not** try to include directly the code in a wiki page either: |
- | something like : | + | something like: |
< | < | ||
Line 288: | Line 291: | ||
</ | </ | ||
</ | </ | ||
- | Because the page use little | + | Because the page use little |
---- | ---- | ||
+ | More simple. Save xls2wiki.php to your dokuwiki\www\ folder and click this link: http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | > I integrated the code from the beginning into a simple plugin. I also added a few helping functions for cleaning up markup resulting from pandoc conversion of docx-files into dokuwiki markup. \\ See: https:// | ||
===== Discussion ===== | ===== Discussion ===== | ||
- | I've installed iframe, but I'm kind of stuck how can I add the php file on the page I want to embed an excel spreadsheet. Can anyone help? Thx in adv. | + | I've installed iframe, but I'm kind of stuck how can I add the PHP file on the page I want to embed an excel spreadsheet. Can anyone help? Thanks |
- | Resp.: I've found a way creating a wikipage and adding {{url> | + | Resp.: I've found a way creating a wikipage and adding {{url> |
===== Remarks ===== | ===== Remarks ===== | ||
- | If you like this you probably love this HTML converter as well : [[http:// | + | If you like this you probably love this HTML converter as well: [[http:// |
+ | |||
+ | ----- | ||
+ | |||
+ | Does not work for me, keep seeing " <? echo $s; ?> " in the input field, and convert does not do a thing, neither on IE nor on Firefox. | ||
+ | |||
+ | Perhaps I'm doing something wrong?? | ||
+ | |||
+ | -Theo | ||
+ | |||
+ | ----- | ||
+ | |||
+ | @theo: It's a " | ||
+ | |||
+ | -Steven | ||
- | Bad link! | + | Changing the ini files worked for me - you also need to restart your Apache server before it will work. --- [[user> |
tips/xls2wiki.1256023075.txt.gz · Last modified: 2009-10-20 09:17 by 194.248.13.254