ExcelPaste-Talk

Summary: Talk page for ExcelPaste.
Maintainer: Pm
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

Problem with Archive

tabtable.zip seems to be a corrupt or damaged archive. Is there somewhere else to get this?

fixed original tabtable.zipΔ and patched tabtable-2007-08-15.zipΔ file. -- (jtankers)

Great! Works also with tables out of Word. Very supportive to help the 'naïve' users overcome the fear of working with tables in PmWiki. Thanks Pm for this one. (DirkBlaas)

Excellent! This recipe, along with BibtexRef and PmWikiDraw, proves that text isn't the only thing you can share. [RickL]

Could you please add the line with the th css background in the cookbook ?

SDV($HTMLStylesFmt['tabtable'],'
table.tabtable { border-collapse: collapse; }
table.tabtable td { border:1px solid #cccccc; }
table.tabtable th { background : #cccccc; }
');

Isidor

Does this recipe work with linux/oppen-office? GC

Yes. Tested with SUSE10 Desktop and OpenOffice 2.02

Does this work on a Mac with Microsoft Office 2004?

Yes, worked fine with Excel 2004 for Macintosh and Safari browser. (April 25, 2006)

This plugin also works to copy and paste from Google Spreadsheets.

Good plugin, but just wanted to mention that with the Beeblebrox-Gila Skin the Button is placed slightly higher for some reason. Don't know if it is due to the skin or this plugin. (July 4, 2006)

Use CSS

  • At first change tabtable.php line 33 <input type='image' name='tabtable' src='\$GUIButtonDirUrlFmt/excel.gif' title='\$[Convert tabs to table]' /> to
    <span class='excelbuttonclass'><input type='image' name='tabtable' src='\$GUIButtonDirUrlFmt/excel.gif' title='\$[Convert tabs to table]' /></span> or
    <input class='excelbuttonclass' type='image' name='tabtable' src='\$GUIButtonDirUrlFmt/excel.gif' title='\$[Convert tabs to table]' />
  • Then add #wikitext .excelbuttonclass input{display:inline;margin:0;padding:0;border:0 none;} or
    #wikitext input.excelbuttonclass{display:inline;margin:0;padding:0;border:0 none;} to YourSkin/style.css to reset operating styles and put the button "in a row" ... or do sth. else --Jazzvox Dec 2011

Can I manually enter tab stop characters in the edit window to use this recipe to quickly generate tables in the browser?

Yes, if you know which key yields tab stop characters in your browser.

Which key yields tab stop characters in the Microsoft Internet Explorer on an XP machine? I tried the tab key along with most modifer keys and combinations of them without luck. --Henning October 24, 2006, at 01:07 PM

Tab is reserved for web page navigation, however you can type tab in Notepad or other text editor and copy/paste. -- (jtankers) August 6, 2007

Patch: make first row a heading (RussFink) The following is a diff-style patch for making tabtable add the '!' to the first row of the tables, thus causing them to appear as heading rows. If you don't want that, you can always manually edit and remove them, but I think for general purposes you might want this. Note, Patrick, if you disagree, please augment this with a variable that lets you deselect the behavior from config.php. I'm not that good of a PHP hack. Here's the patch.

--- tabtable.php        2005-02-25 10:30:23.000000000 -0700
+++ tabtable-raf.php    2007-01-23 10:21:41.000000000 -0700
@@ -50,15 +50,17 @@
     while ($row && count(end($row))==0) { array_pop($row); $x = "\n".$x; }
     if ($row) {
       $y[] = "||class='tabtable'";
+      $_first = '!'; /* RAF * first pass use heading formats */
       while ($row) {
         $col = array_shift($row);
         $r = '||';
         for($i=0; $i<count($wid); $i++) {
           $m = preg_match('/^\\s*\\(?-?[\\d,]+\\.?\\d*\\)?\\s*$/', @$col[$i])
-               ? " %{$wid[$i]}s||" : "%-{$wid[$i]}s ||";
+               ? "$_first %{$wid[$i]}s||" : "$_first%-{$wid[$i]}s ||"; /* RAF */
           $r .= sprintf($m,@$col[$i]);
         }
         $y[] = $r;
+        $_first = ''; /* RAF */
       }
       $row = array(); $wid = array();
     }

Nice recipe, but first shot revealed a serious bug: when you already have tables on your page, it repeats them all over the resulting page. So if you convert with this recipe, you should do it in an empty page and then copy-paste it to your target. (June 2007)

Awesome! This can be a huge first step in integrating a table into a wiki page leaving only minor formatting changes. Works great for me. I do have a feature request: i would like for the recipe to have the ability to convert to the advanced table markup instead of the "||" markup. -- lordmundi August 01, 2007, at 07:38 AM

That would be a powerful feature. I do like the standard mark up also, as it favors editor accessibility over display format.

Patch: Special characters and concise output (jtankers) This patch tabtable-jt (or patched tabtable-2007-08-15.zipΔ) converts embedded line feeds and pipes, trims extra spaces and conditionally makes first row a heading.

Suggestion for improvement: Use advanced table markup

Let the recipe generate advance table markup instead. This, combined with the recipe Cookbook:TableEdit, allows one to easier edit the pasted table.

Talk page for the ExcelPaste recipe (users?).