WikiTaskTutorial/Word

From BITPlan Wiki
Jump to navigation Jump to search


This is an Example for accessing Microsoft Word docx data from a WikiTask. The example file is the Canteen Menu of Ermington public school

template

This template includes Office#Word

@include(wiki.Office.Word)
Word Document: @(wikiTask.getInput())
@if(docx.error) {  
can not be opened due to error @(docx.error.getMessage())
} else { has the following content:
<pre>
@for (XWPFParagraph paragraph:docx.doc.getParagraphs()) {
@(paragraph.getText())
}
}
</pre>

wikitask

{{wikitask|cmd=runtemplate|input=http://www.ermington-p.schools.nsw.edu.au/documents/6611571/6623444/Canteen%20Menu%202015.docx|engine=Rythm|template={{FULLPAGENAMEE}}#template|targetpage={{FULLPAGENAMEE}}#result}}

runtemplate -> WikiTaskTutorial/Word#result

result

Word Document: http://www.ermington-p.schools.nsw.edu.au/documents/6611571/6623444/Canteen%20Menu%202015.docx has the following content:

 ERMINGTON PS CANTEEN 


Order your child’s recess and lunch online!
www.school24.com.au - School ID - 25130963
Healthy choices menu guide!
☺ Green foods – Healthy choice
 ♣  Amber foods – Healthy choice


RECESS ONLY
Toasties - ½ serve toasted sandwich  
☺	Cheese,  Baked Beans  or  Spaghetti	1.00
☺	Cheese & Tomato  or  Ham & Tomato	1.20
 ♣	Ham	1. 10
 ♣	Ham & Cheese	1.20
 ♣	Ham, Cheese & Tomato	1.40
*Toasties made with ham must be ordered as no extras made
Tasty Cheese – (minimum of 2  +  extra .50c)
 ♣	Garlic Bread	.70
 ♣	Hash Brown	.90


DRINKS
☺	Bottled Water 600ml	1.20
 ♣	Focus Sports Water 350ml
               (Fruit Tingle, Lemonade, Raspberry)	1.80
☺	Just Juice (Apple, Apple/Blackcurrant, Orange)	1.00
☺	Milk low fat 300ml (Chocolate, Strawberry)	1.60
☺	Up & Go (Chocolate, Strawberry, Vanilla, Banana)	1.80

SNACKS
 ♣	Chocolate Chip Cookies (Chunkies Minis)	.80
 ♣	Finger Bun	1.60
☺	Frozen Pineapple	.30
☺	Fruit Cup (Crunch ‘n Sip size)	.90
☺	Fruit Salad Tub (terms 1 & 4 only)	1.60
 ♣	Gingerbread Kids	1.80
 ♣	Grain Waves (Sour Cream & Chives)	1.30
 ♣	Hot Kids Rice Crackers –      small .20    large	.30
☺	Munch Crunch (2 x celery and carrot sticks plus
	                           2 crackers w/- tasty cheese slice)	1.20
 ♣	Piranha Snacks (Sunday Roast or Salt & Vinegar)	1.10
☺	Popcorn (BBQ)	1.30
☺	Popcorn (Plain)	1.00
☺	Vege Snack (4 sticks)	- Carrot or Celery	.60
 		- Cucumber	.80
☺	Vita-Weets Crackers (2 x buttered)	.60
LUNCH ONLY

SANDWICHES

Sandwich = 1 white/1 brown slice
☺	Buttered Crust  .20  Bread & Butter (per slice)	.50
☺	Bread Roll (plain, no filling)	1.00
	Sandwich on a roll        extra  .50c
*‘Extra’ fillings (added to any sandwich from below)
  -  salad	.50
  -  tasty cheese	.50
  -  processed cheese, lettuce, or tomato	.25
* 	Eg Ham, tasty cheese and salad                        =	$3.20
☺	Cheese (individually wrapped slice)	1.80
☺	Cheese (Tasty)	2.20
 ♣ Chicken Loaf or Ham	2.20
 ♣	Devon	2.00
 ♣	Honey, Jam or Vegemite	1.50
☺	Salad (lettuce, tomato, carrot, cucumber, celery)	2.50
☺	Tuna (plain or flavoured)	2.50
☺	Salad Bag (+ 2 crackers w/- tasty cheese slice)	3.50

HOT FOODS
☺	Chicken Burger with salad and mayo	3.50
 ♣ Chicken Burger, no salad	3.00
 ♣	Chicken Pattie	2.00
☺	Corn on the Cob	.80
☺	Fried Rice (Hakka) (GF)	3.40
 ♣	Garlic Bread	.70
☺	Lasagne	3.00
☺	Macaroni Cheese	3.00
☺	Spaghetti Bolognese	3.00
 ♣	Noodles (Fantastic) (Chicken or Oriental)	2.20
 ♣	Pie (Large)	3.00
 ♣	Pie (Small)	2.40
 ♣	Pizza Single (Ham/Pineapple or Cheese & Bacon)	2.20
 ♣	Potato Pie	3.50
 ♣	Sausage Roll	2.40
	Extras - Sauce sachet (tomato or bbq)	.25
	              Spoon or fork (without order)	.10
FROZEN TREATS         
☺	Frozen Pineapple	.30
 ♣	Funny Finger or Calippo	1.00
 ♣	Icy Twist (Lemonade)	1.20
 ♣	Juicy	.60
 ♣	Paddle Pop (Chocolate or Rainbow)	1.30
 ♣	Paddle Pop – (Dragon Popper)	1.60
 ♣	Sunny Boy (Cola, Raspberry, Pine/Lime)	1.20