Page 1 of 1

Cell coloring

PostPosted: Wed Nov 14, 2012 1:46 am
by NinjaAssassin
I'm hoping someone here can help as I'm making absolutely no progress with this. I'm simply trying to set the background fill color of a cell. I've looked at some of the relevant posts here, read the related part of the Open XML spec, and have looked at the contents of an xlsx file I created manually but it's not clear to me what steps I need to take to do this programmatically. I haven't been able to turn up anything helpful on Google, either. At this point, I'm not sure what to do after creating the Styles part.

Would anyone be able to give me a "short" example of doing this or explain the process to me as if I'm a two year old (I feel like one at the moment)?

Thanks

EDIT: For what it's worth, I'm able to set column widths and insert values into cells. At the moment, I'm just struggling with this part.

Re: Cell coloring

PostPosted: Tue Dec 04, 2012 6:51 am
by NinjaAssassin
Well, I decided to simply save an XLSX file with the coloring and other formatting already set. I can load the template document, insert my data and modify column widths and row heights as necessary, then save it as a different file.

Can anyone direct me to some information on loading an existing styles.xml? This isn't obvious to me.