I am using DocumentFormat.OpenXml.Drawing to generate a powerPoint document with a table in it. As the slise below is generated, I am trying to conditionally change table cell color. I cannot figure out the correct syntax to color a cell. Can someone offer
ideas on how to set the tablecellstyle through the C Sharp code below?
foreach (Announcement item in q)
{
Drawing.TableRow tr = new Drawing.TabelRow();
Drawing.TableCell tc = new Drawing.TableCell();
Drawing.TableCellStyle tsc = new Drawing.TableCellStyle();
tr.Height = 370840;
tr.Append(CreateTableCell(item.Title.ToString()));
tables.First().Append(tr);
}
thanks for the suggestion. This one is not a Visual Studio add in, but a custom SharePoint webpart. I suppose I will try a few of the other forums as well. thanks again for replying...
No, that's a forum I didn't know about as i am also working a VST add-in solution separately.
The body of knowledge here is amazing. Apppreciate you taking the time to reply...
bethlz
Member
5 Points
20 Posts
chnaging cell color Open Xml
Nov 28, 2012 03:54 PM|LINK
Hello,
I am using DocumentFormat.OpenXml.Drawing to generate a powerPoint document with a table in it. As the slise below is generated, I am trying to conditionally change table cell color. I cannot figure out the correct syntax to color a cell. Can someone offer ideas on how to set the tablecellstyle through the C Sharp code below?
foreach (Announcement item in q)
{
Drawing.TableRow tr = new Drawing.TabelRow();
Drawing.TableCell tc = new Drawing.TableCell();
Drawing.TableCellStyle tsc = new Drawing.TableCellStyle();
tr.Height = 370840;
tr.Append(CreateTableCell(item.Title.ToString()));
tables.First().Append(tr);
}
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: chnaging cell color Open Xml
Nov 29, 2012 04:00 AM|LINK
Hello,
What technology are you using?
If it's a 3-rd party toolkit, I suggest you going to the 3-rd party forum, where you can be served well.
bethlz
Member
5 Points
20 Posts
Re: chnaging cell color Open Xml
Nov 29, 2012 02:12 PM|LINK
Hello, Visual Studio 2010 with c# and reference to OpenXML for creating office documents via C#.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: chnaging cell color Open Xml
Nov 30, 2012 12:30 AM|LINK
Hi again,
I think you'd better submit your question to: http://msdn.microsoft.com/en-us/office/hh133430.aspx
This is a suitable place for you to ask Office programming.
bethlz
Member
5 Points
20 Posts
Re: chnaging cell color Open Xml
Nov 30, 2012 12:45 AM|LINK
thanks for the suggestion. This one is not a Visual Studio add in, but a custom SharePoint webpart. I suppose I will try a few of the other forums as well. thanks again for replying...
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: chnaging cell color Open Xml
Nov 30, 2012 03:58 AM|LINK
Sorry I don't mean to let you send the issue to add-in of Vs, but I just guess you are asking problem about Office development.
bethlz
Member
5 Points
20 Posts
Re: chnaging cell color Open Xml
Nov 30, 2012 06:36 PM|LINK
No, that's a forum I didn't know about as i am also working a VST add-in solution separately.
The body of knowledge here is amazing. Apppreciate you taking the time to reply...