hlod,
I'm not clear what data you want to write to your spreadsheet. You're reading multiple samples of data for each channel, however you're only writing a single point to the spreadsheet. Is this your desired behavior? Additionally you've mentioned that a few things aren't working, however you don't mention in what way they're not working. If you can provide those details, perhaps I can be of more help.
Dan