C.O.
The sweets and cookies are probably throwing her off, but any habit made in two days can be broken in two days.you'll get back on track when all the company leaves. We got so many gifts of cookies and candy from folks who want to spoil my son with love. We let him enjoy and we throw out the rest.
As far as the spitting out of food, a perfectly normal behavior. Although it is disgusting. It is probably just an exploration phase. My son still does this at 2 1/2 if the food isn't soft enough or he's not hungry or not that into the items being served. I don't have great advice on mealtime except to say that it is a battleground you won't probably win on in the short term. My son loves to remind me that he is in control of his food. I cannot open his mouth and force the food down. A great book-child of mine, not sure who it's by. But she is like a pediatric nutritionist. The toddler chapter is so funny, because she basically says tread lightly and it'll be over soon.
Your little one is a little younger than the true toddler that will start to battle on the food front starting around 18-20 months, so I imagine this spitting is temporary. My other recommendation, look at her food intake on a daily or even weekly basis. If she is spitting out at dinner,did she have a sufficient breakfast and kunch? If so you shouldn't stress. Same with days of the week, if monday and tuesday were good days. Don't sweat on wednesday.
This is a long term teaching opportunity-sorry for the bad news!
Haha! Good luck!