On 06/10/2010 02:12 PM, Thomas Mortagne wrote:
On Thu, Jun 10, 2010 at 12:43,
Ziggy<ziggy25(a)gmail.com> wrote:
Tables - Copying and pasting from excel into
Xwiki
I tried to copy a table in excel and paste it(from the clipboard) into a
document in Xwiki which was open in WYSIWYG mode. The table looked fine but
when i looked at the document in WIKI mode it came up in the following
format
(% border="0" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse; width: 144pt;" width="192" %)
(% height="17" style="height: 12.75pt;" %)|(% height="17"
style="height:
12.75pt; width: 48pt;" width="64" %)Value1|(% style="width:
48pt;"
width="64" %)Value2|(% style="width: 48pt;" width="64"
%)Value3
(% height="17" style="height: 12.75pt;" %)|(% height="17"
style="height:
12.75pt;" %)NextValue2|NextValue3|NextValue4
I thought the table would come up looking like this (In Wiki mode)
|value1|Value2|Value3
|nextValue1|nextValue2|nextValue3
That's because when you copy paste from excel, excel give us a html
table with many styling parameters in it (all you find between, (% and
%)).
If you want a "clean" copy/past you can use
"Import" -> "Office
Content (Copy/Paste)" and make sure "Filter Styles" is enabled.
Indeed, as Thomas said, it is recommended to use this dialog to paste
office content rather than passing it directly in the WYSIWYG text area.
Hope this helps,
Marius
What exactly is that format that appeared when i copied and pasted the table
from excel? it looks like cascading style sheet but not quite exactly
cascading style sheet.
How can i understand it?
Basically (%param=value%) syntax is a way to attach custom parameter
to a syntax element. Here is a simple example:
|cell1|cell1
produce more or less
<table><tr><td></td><td></td></tr</table>
but you can also have some custom table parameters
(% class="myclass" %)
|cell1|cell1
produce
<table
class="myclass"><tr>cell1<td></td><td>cell2</td></tr</table>
----------------------------
(% class="myclass" %)|cell1|cell1
produce
<table><tr
class="myclass"><td>cell1</td><td>cell2</td></tr</table>
----------------------------
|(% class="myclass" %)cell1|cell1
produce
<table><tr><tdclass="myclass">cell1</td><td>cell2</td></tr</table>
And also sometimes i see reference to definitions of styles within the table
(i.e. class="xl25", class="x122") etc. Where would this classes be
defined
and if i upgrade the xwiki installation would these style
(% height="17" style="height: 12.75pt;" %)|(% class="xl22"
height="17"
str="- 2.8.17 [Ref #15] Check for message displayed. " style="height:
12.75pt;" %)- 2.8.17 [Ref #15] Check for message displayed. |(%
class="xl22"
style="border-left: medium none;" %)
(% height="17" style="height: 12.75pt;" %)|(% class="xl22"
height="17"
str="- 2.8.17 [Ref #16] Check for message reversion. " style="height:
12.75pt;" %)- 2.8.17 [Ref #16] Check for message reversion. |(%
class="xl22"
style="border-left: medium none;" %)
Thanks
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users