How to copy a table column including text

Questions about how to use the online - editors and suggestions how to improve them
Nicky
Posts: 94
Joined: Sun Feb 08, 2009 9:50 am

How to copy a table column including text

Postby Nicky » Wed May 09, 2012 9:27 am

Is it possible to add a new column in a table, then copy all text of the already existing column in there?
How can I do this?
Thanks

cmb
Posts: 11432
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: How to copy a table column including text

Postby cmb » Wed May 09, 2012 9:45 am

Hi Nicky,

AFAIK there's no easy way to accomplish this. You have to add the new column and then copy each cell.

Christoph
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Tata
Posts: 2359
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: How to copy a table column including text

Postby Tata » Sun Jul 29, 2012 7:48 am

darpon wrote:Is it like an array?

It is to understand that a table is practically organized of rows/columns containing cells. The cells are practically separated containers. The editor is able to insert a row or a column so that it counts number of columns in neighboring row or rows in neighboring columns and then inserts either a row:

Code: Select all

<tr><td</td>...<td</td></tr>
or a column so that id adds one cell into each row.
To insert the row/column containing some content already would mean to work in HTML mode and to have skills to work with HTML code. Inserting a row would not be difficult.
1. Copy the code from existing table (must be of the same structure as the target table)
2. Insert the whole row-code into target table.
To insert a column is also possible, but not in one step. New column means new cell in each row.
Much safer and faster is to do it in WYSIWYG mode:
1. Insert a row/column using the functions of your editor
2. Copy desired content and insert it cell-by-cell.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

vdonatiello
Posts: 43
Joined: Wed Jun 18, 2008 8:20 am

Re: How to copy a table column including text

Postby vdonatiello » Sat Jul 25, 2015 5:03 am

hello

i am struggling to understand how to use "table" with the editor ... i have noticed this post was made 3 years ago and maybe now there are new version of editor and cmsimple (i am using 1.6.7)

my first thought was to insert a table (define how many columns and rows) and then copy and paste in the cell values ... but it doesn't work, same as you are saying here that need to paste in cell by cell ...

do you guys confirm that is the state of the art, still to insert cell values one by one, or maybe i havent find the best way to use it?

many thanks

Vito

cmb
Posts: 11432
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: How to copy a table column including text

Postby cmb » Sun Jul 26, 2015 9:22 pm

vdonatiello wrote:my first thought was to insert a table (define how many columns and rows) and then copy and paste in the cell values ... but it doesn't work, same as you are saying here that need to paste in cell by cell ...

Well, it is possible to paste a complete table from the clipboard, if it's in the necessary format (OpenOffice Calc and MS Excel should work). Just don't create the table in the editor before.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

vdonatiello
Posts: 43
Joined: Wed Jun 18, 2008 8:20 am

Re: How to copy a table column including text

Postby vdonatiello » Mon Jul 27, 2015 10:13 am

hello,

i would like to further discuss how to handle tables and what are the best practices (not sure if it is right to continue under this current subject)

i believe that table are quiet important element, even if not for layout but some or later i suppose most content will have to deal with a table somehow

i have understood from previous posts that is better to edit the table is Excel or other software and then paste it in the CMSimple editor ... and so i did and experimented a bit (just for reference, forgive my poor attempts: http://www.lifestyleandmore.it/iwfm/?Table-Test)

if i paste a table from Excel i have noticed the following:
• it introduce in the HTML a class which correspond with the column width (i thought class was a CSS thing, i opened CSS file to see what the class was and there is not mention in the CSS)
• column width i am experiencing different result from WYISWYG editor and the published output :-(
• it won’t carry any formatting info such as font style size, alignment ...

if i paste a table from Word i have noticed the following:
• it carries Bold formatting for examples, it also carries alignment left or right ... but it doesn’t care about font style size, borders, padding ...
• the column width is still tricky for me to understand how it calculate it
• it insert the TD inside a <P element ... which i don’t like it ... sometime i feel the extra space above and below each cell values is not good looking ...

in conclusion i would like to ask if anyone knows a better way to deal with tables ... for instance alternate background colors, etc ...

cmb
Posts: 11432
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: How to copy a table column including text

Postby cmb » Mon Jul 27, 2015 12:46 pm

vdonatiello wrote:in conclusion i would like to ask if anyone knows a better way to deal with tables ... for instance alternate background colors, etc ...

It's probably best to edit the tables with the limited capabilities of the WYSIWYG online editor (TinyMCE or CKEditor). An initial import from a spreadsheet application should be fine, but repeated imports may indeed raise issues, such as mentionend by you, Vito. Using the button "Paste from Word" may help, or not.

If you'd have to recreate the tables frequently, consider to use some plugin/add-on, which reads the data from CSV files. This way you'd only have to update the CSV files. AFAIK, there is no such plugin (yet), however, but at least there is a script (which would have to be customized): http://cmsimpleforum.com/viewtopic.php?f=16&t=263&p=34534#p34534.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Maxim
Posts: 122
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

Конвертор из XLS в HTML

Postby Maxim » Tue Jul 28, 2015 4:27 am

Maybe this will help:
http://vkleonid.narod.ru Converter from XLS to HTML

Может это поможет:
http://vkleonid.narod.ru - Конвертор из XLS в HTML

vdonatiello
Posts: 43
Joined: Wed Jun 18, 2008 8:20 am

Re: How to copy a table column including text

Postby vdonatiello » Tue Jul 28, 2015 6:01 am

cmb wrote:Using the button "Paste from Word" may help, or not..

i have tried, no much difference with a simple CTRL+V

kept experimenting with pasting ...

“Paste from Word” will carry the following attributes:
• border, strong, align, padding, spacing, title
• But it also add every cell within a <p> element which I don’t really like and I am thinking it is not very useful

Paste from Excel will add the following attributes:
• Table width, border, spacing, and padding
• Will also add each cell width and height, maybe this is not good if it is not right (most of the time the content is not fit properly in the cell) then need to modify each cell …
• Neglect formatting such as auto fit column width, strong, align

both solution are not optimal because need lot of fixing on the HTML part to adaprt it

Maxim wrote: Converter from XLS to HTML


thanks to Maxim's tip, there are several tools online to convert excel to html ... in my opinion or at least for my purposes that is the best solution, make a tabel in excel, convert into HTML with some tool, paste it into the editor and fixing it up ... that seems the way requiring less editing

but if anyone has a better idea :-)

thanks,

Vito

lck
Posts: 842
Joined: Wed Mar 23, 2011 11:43 am
Location: Germany
Contact:

Re: How to copy a table column including text

Postby lck » Tue Jul 28, 2015 9:24 am

An alternative could be:
  • Convert table to pdf.
  • Create a screenshot of the table.
  • Fit the image to the content area (width, transparency, etc.).
  • Insert image in your Web page and link it with the pdf file.
Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig ;)       ► CMSimple_XH Templates & OnePage-Templates ◄


Return to “Editors”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests