Hi There, I am trying to export to excel in a particular format. Below is my current code:
I can get the following formats.. Viewed better in attachment: What I really want is the date to be a header and the shift code to align to the date and employee. Any suggestions?
Isabella D L E E L N N L
Anthony Phan D D L D E D L L
Michael B D L N L L N N L
Alana Gill N N N N N N N N
Sophie Dreves E E D D D L E E
Reece Bamford N D D L N E E D
Clayton Fletcher E E E E E D L L
Gemma Nevin D L L N E E D L
Michael C E E N N D E L D
Lisa Coull D L L L D L E E
Karen Ahrens L E E E N D E D
David Hemmings L N N N N N N N
Rodney Bowden wrote:What I really want is the date to be a header and the shift code to align to the date and employee. Any suggestions?
I'm not entirely sure what you mean by a "header" and "align to the date and employee", but I think I have a fairly good idea. However my suggestion would be this: first decide what you want the spreadsheet to look like, then write code to produce a spreadsheet which looks like that.
In your case that might involve you deciding that you want a date to appear in row 3 followed by the employees scheduled to work on that day, followed by another date and the employees scheduled to work on that day. Or you might decide you want all of the dates to appear in row 3 followed by the employees with shift codes under the dates they are working. Anyway once you have that figured out and scribbled down on a piece of paper, you could start writing code to produce that layout.