Free JavaScript Event Calendar
Easier Event Editing
Home
History/Background
My Enhancements
View Demos
Calendar Gallery
How It Works
Using Enhancements
Customizing Look
Contrib
Holidays & Alternate Dates
Easier Event Editing
Frequently Asked Questions
Downloads
Contact Me
Sample Excel-based Event Editor
Sample Excel-based Event Editor

JavaScript can be very picky about syntax. A missing comma or quotation mark can cause an error resulting in a truncated or even missing calendar display. Kevin had told me this was a common issue among the people he heard from. To reduce the chance for such errors, I use a language-sensitive text editor such as the FREE SciTE editor. Then I got the idea of writing Microsoft Excel macros to convert the event data between the event script file format and the spreadsheet table display with which many people are now familiar and decided to implement this and some of my other enhancements.

Now I use the familiar spreadsheet environment for event editing and just select the "Export Calendar Script..." item I added to the "File" menu to format my events into an event file automatically. I prefer to start with my event spreadsheet and "push" the events out to the script, but if I want to make adjustments to the event script directly, I can also import the revised data from my edited event script into the event spreadsheet for next time. The "Import Calendar Script..." feature is also useful if you already have an event script you have been using with Kevin's version and you want to maintain it in Excel without having to re-enter everything.

I set up the spreadsheet to calculate the day of the week automatically from the date entered to help prevent entry errors. I also use the conditional fomatting capability of Excel to alternate the background color on even and odd months and turn it red if a date is out of order to help with event entry.

TIP

If you use a hyphen (i.e. 8-9 pm) in your event text, HTML may decide to split the event description there which will leave the end time at the beginning of the next line and mislead your visitors who don't read carefully. If you replace the hyphen with a "‑" code, you get a non-breaking hyphen which avoids that problem.

TIP

Be very careful if you use a quotes in your event text, since quotes are used to separate the event arguments. You may discover that the rest of your events disappear from your calendar.

You may be able to get them to work by preceding literal quote characters with a "\" character or replacing them with a "&quot;" code. Instead of quoting text for emphasis I prefer to use italics by wrapping the desired text in <em> </em> tags or the deprecated <i> </i> tags.

I have two basic versions of Excel spreadsheets available in the "pik_xl" package on the Downloads page. The first maintains event scripts in the "DefineEvent" format which is the same in Kevin's original version and in mine. The second maintains event scripts in the extended "AddEvent" format which can be used with my category layer enhancement, but can also convert "DefineEvent" format scripts.

I have also made a few custom spreadsheets for some sites which have components of the event text split into multiple columns (i.e. event description with start and/or end time of the event). These event text components are then combined on export to produce the event text for display; however, in these versions I usually disable the import function because it can be difficult to split the merged event text back into the original components reliably.

TIP

If you use the spreadsheet for maintaining "AddEvent" format scripts, it is important to avoid typos in the category column; otherwise the calendar will helpfully create a new category and checkbox for it using the mistyped name. In Excel you can use [Alt][DownArrow] or select "Pick from list" from the right mouse button menu to select from a list of previously entered values in that column.

Another approach which I prefer is to define your own category list using the "Validate..." option on the "Data" menu. On the settings tab, set "Allow:" to "List", enter a comma separated list of your categories in the "Source:" box, and make sure "In-cell dropdown" is checked. You should also be able to modify the macro to apply this validation automatically to the category column for new rows.

TIP

At some point you may wish to truncate old events. To save for historical reference, you can just move the old events to another worksheet in the workbook named for the old time period covered.

If you like our script, please rate it!

 

Last updated on