Table Columns and Rows

Technical support for Spire.Doc

Moderator: iceblue support

Table Columns and Rows

Postby Finalsky » Fri Mar 04, 2011 2:03 am

I want to create a table into the word document, but my data is too much. I don't know how many columns and rows it may contain. What should I do for this issue??
Finalsky
 
Posts: 13
Joined: Wed Dec 22, 2010 1:12 am

Re: Table Columns and Rows

Postby iceblue support » Fri Mar 04, 2011 7:55 am

You may use the method table.ResetCells(data.Length + 1, header.Length). In this way, you don't need to know the columns and rows of the your data.
e-iceblue support
User avatar
iceblue support
 
Posts: 244
Joined: Tue Dec 21, 2010 2:56 am

Re: Table Columns and Rows

Postby ali.butt2008 » Tue May 03, 2011 11:14 am

I am using spire.doc trial version. I create table and fill values in the table. Now I want to set the color of the text in the table cell. Please tell me the solution or path from where I get help.

Example :Below is the table that contains four columns each cell contain numerice values. Now I want to change the color of numeric value
If cell suppose 22 is less than 50 change the text color to green.

If (cell<50)
{
Make 22 green color in the word document.
}

A B C D
21 22 23 60
ali.butt2008
 
Posts: 2
Joined: Tue May 03, 2011 7:19 am

Re: Table Columns and Rows

Postby Justin Weng » Thu May 05, 2011 8:32 am

Dear ali.butt2008 ,
Thanks for your inqury.It's very simple!

The pseudo-code is like this:
If (cell.value<50)
{
cell.CellFormat.BackColor = Color.Green;
}
If you still have some questions,please ask us again!
Justin
Technical Support / Developer,
e-iceblue Support Team
User avatar
Justin Weng
 
Posts: 110
Joined: Mon Mar 28, 2011 5:54 am


Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests