Formatting of columns/cells using spire.Export

Technical support for Spire.DataExport

Moderators: iceblue support, DataExport, Manager

Formatting of columns/cells using spire.Export

Postby stc@seapay.dk » Wed Sep 10, 2008 4:45 am

I am currently facing some problems with the formatting of columns exporting from a listview to excel.

I am trying to e.g format the header in the table i get when exporting
my listview.
I am using the event

private void Export_GetTitleParams(object sender, Spire.DataExport.EventArgs.TitleParamsEventArgs e)
{
if (e.Col == 0)
{
e.Format.Borders.Bottom.Style = CellBorderStyle.Thick;
e.Format.Borders.Left.Style = CellBorderStyle.Double;
e.Format.Borders.Top.Style = CellBorderStyle.Double;
e.Format.Borders.Right.Style = CellBorderStyle.Thin;

}

if ((e.Col >= 1) && (e.Col <= 9))
{
e.Format.Borders.Bottom.Style = CellBorderStyle.Thick;
e.Format.Borders.Left.Style = CellBorderStyle.Thin;
e.Format.Borders.Top.Style = CellBorderStyle.Double;
e.Format.Borders.Right.Style = CellBorderStyle.Thin;
}

if (e.Col == 10)
{
e.Format.Borders.Bottom.Style = CellBorderStyle.Thick;
e.Format.Borders.Left.Style = CellBorderStyle.Thin;
e.Format.Borders.Top.Style = CellBorderStyle.Double;
e.Format.Borders.Right.Style = CellBorderStyle.Double;

}

e.Format.FillStyle.Background = CellColor.Gray25Percent;
e.Format.FillStyle.Pattern = Pattern.Solid;



}


My problem is that if i want to apply special borders for column1, some other borders for column 2 -9 and again some other for the last column 10 it only takes the last formitting for column 10 and applies it for all the columns

Is it a bug in the export module or are im doing something wrong

Steen Christiansen
[/url]
stc@seapay.dk
 
Posts: 4
Joined: Tue Aug 19, 2008 8:32 am

Return to Spire.DataExport

Who is online

Users browsing this forum: No registered users and 0 guests