When creating a calendar using tables, how do you move the days forward/backward
Learn / Forums / General InDesign Topics / When creating a calendar using tables, how do you move the days forward/backward
Tagged: tables cells calendar months
- This topic has 9 replies, 7 voices, and was last updated 8 years, 1 month ago by G Imh.
-
AuthorPosts
-
-
May 20, 2015 at 10:43 pm #75525Elle YMember
Hi!
Am trying to create calendar months by using tables, instead of just tabbing the days forward in a text box. Question is, when I want to move the 1st of the month foward or backwards in the cells, how I do that instead of retyping all over again?Thanks!
-
May 20, 2015 at 11:42 pm #75526Colleen ShannonMember
If you haven’t gotten too far into it:
https://calendarwizard.sourceforge.net/
Everything has Styles, which makes it easy to customize.Otherwise, I used to copy/paste cells, then copy entire tables for months that start on the same day (adjust the last days).
You can still do the Tab thing, and Table->Convert Text to Table (or Table to Text)
Or maybe someone will have a better idea after me….
-
May 21, 2015 at 1:46 am #75528Theunis De JongMember
Shifting table contents globally ‘left’ and ‘right’ into previous and next rows, is not a usual table task. If a table column is not aligned correctly with another, you can copy-and-paste the wrong content one position to the left or right. But that won’t work with ‘row wrap’.
Fortunately, it can be scripted. Here are
shiftup.jsx
andshiftdown.jsx
. They move the *text content* of a table one cell left or right – unless there is something in the first (or last) cell, of course!//DESCRIPTION:Shift table cells 'up' // A Jongware Script 21-May-2015 currTable = app.selection[0]; if (currTable.hasOwnProperty('baseline')) currTable= app.selection[0].parent; while (currTable instanceof Cell || currTable instanceof Row || currTable instanceof Column) currTable = currTable.parent; if (currTable instanceof Table) { if (currTable.cells[0].texts[0] && currTable.cells[0].texts[0].length > 0) { alert ("no room to shift up!"); } else { for (i=1; i<currTable.cells.length; i++) currTable.cells[i].texts[0].move (LocationOptions.AT_BEGINNING, currTable.cells[i-1]); } } else { alert ("please make sure the cursor is inside a table!"); }
and
//DESCRIPTION:Shift table cells 'down' // A Jongware Script 21-May-2015 currTable = app.selection[0]; if (currTable.hasOwnProperty('baseline')) currTable= app.selection[0].parent; while (currTable instanceof Cell || currTable instanceof Row || currTable instanceof Column) currTable = currTable.parent; if (currTable instanceof Table) { if (currTable.cells[-1].texts[0] && currTable.cells[-1].texts[0].length > 0) { alert ("no room to shift down!"); } else { for (i=currTable.cells.length-2; i>=0; i--) currTable.cells[i].texts[0].move (LocationOptions.AT_BEGINNING, currTable.cells[i+1]); } } else { alert ("please make sure the cursor is inside a table!"); }
-
May 21, 2015 at 1:57 am #75529Elle YMember
Thanks for all your speedy replies!
Colleen, I had come across that option before, but I thought it was a tad too complicated for me to customise; I need very varied options with cell colours, lines, spacing, text formatting etc and am more familiar with the usual style sheets. But yes, should I wanna explore that, it’s a great option! Thanks.
-
May 21, 2015 at 2:00 am #75530Elle YMember
Thanks very much for the scripts Jongware! Am going to explore them.
Am not very script savvy, so I’ll definitely give a shout I wasn’t quite successful in converting them to documents.
Fingers crossed.
Will update! -
May 21, 2015 at 2:08 am #75531Elle YMember
Ahhh! Thanks Jongware! The scrips are fantastic! Exactly what I wanted. Thank you very much!
-
May 21, 2015 at 5:41 am #75532David BlatnerKeymaster
That’s an awesome script, Jongware.
But for most people who want to make calendars, I like Colleen’s suggestion, which we explore in details here:
https://creativepro.com/calendar-template-time.php
and
https://creativepro.com/make-a-calendar-with-every-interfaith-holiday-listed-on-it.php -
May 22, 2015 at 6:37 am #75553Masood AhmadParticipant
Jongware, that was a great script. I love the way you share your talent and experience with others. Thanks.
-
May 22, 2015 at 8:39 am #75567Eugene TysonMember
I just insert an empty return, set the leading to 0.
Then I use automatic numbering in the paragraph style.
Style to suit.
Copy one cell
Select all cells
Paste
Delete text from cells until you’re at the start day where it’s 1.
And remove excess days at the end.
-
February 27, 2016 at 11:11 am #82323G ImhMember
Jongware, is there a way this script can be revised so that instead of moving contents of a cell left or right, it moves that content up or down in a table?
Thanks.
-
-
AuthorPosts
- You must be logged in to reply to this topic.