Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu May 10, 2018 10:01 am

Hi ,

Anyone please Help

1)How to set Layout to "Classic Pivot Table Layout".
2)How to set All column width to AutoFit.
3)And How to set Border for Pivot Table

I have tried all possible ways but not able to get suitable result.

Thanks in Advance

Dharam
 
Posts: 13
Joined: Tue May 08, 2018 8:51 am

Fri May 11, 2018 9:20 am

Dear Dharam,

The answers for your questions, please refer to the below code:
Code: Select all
//1.set Classic Pivot Table Layout
pt.Options.ShowGridDropZone = true;
pt.Options.RowLayout = PivotTableLayoutType.Tabular;
//2.autofit columns generated by the pivot table
pt.CalculateData();
sheet.AutoFitColumn(1);

//3.custom the style of border
string styleName = "ptborder";
pt.CustomTableStyleName = styleName;
PivotTableStyle pivotTableStyle = new PivotTableStyle(styleName);
PivotStyle pivotStyle = workbook.CreatePivotStyle();
pivotStyle.Borders[BordersLineType.EdgeLeft].Color = Color.Blue;
pivotStyle.Borders[BordersLineType.EdgeLeft].LineStyle = LineStyleType.Thin;
pivotStyle.Borders[BordersLineType.EdgeRight].Color = Color.Red;
pivotStyle.Borders[BordersLineType.EdgeTop].Color = Color.Red;
pivotStyle.Borders[BordersLineType.EdgeBottom].Color = Color.Red;
pivotStyle.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Thick;
//pivotStyle.Borders.LineStyle = LineStyleType.Thin;

//apply the style where you need to add
pivotTableStyle.Styles.Add(PivotTableElement.wholeTable, pivotStyle);
workbook.AddPivotTableStyle(pivotTableStyle);


Sincerely,
Wade
E-iceblue support team
User avatar

Wade.shao
 
Posts: 32
Joined: Thu Mar 22, 2018 8:23 am

Wed May 16, 2018 4:21 am

Thank You Wade for reply


I have one more doubt :
Is there any way to set default value of filter .
I am using free version of Spire.XLS

Dharam
 
Posts: 13
Joined: Tue May 08, 2018 8:51 am

Wed May 16, 2018 8:48 am

Dear Dharam,

Thanks for your information.
After further investigation, I found the property "IsMultipleSelect" should be set as "true" firstly, then set the default value. Yet saving the result will throw the same error "the given key..." like yours, I have posted this issue to our Dev team. We will let you know if there is any update.
Besides, to help us fix your issue fully, you'd better to provide your input file and the expected file you want. You could send it to us(support@e-iceblue.com) via email, we promise to keep it confidential.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu May 17, 2018 2:32 am

Dear Dharam,

Thanks for your sharing.
I have tested the Excel(Dashboard Dump.xlsx) and reproduced the issue. Our DEV team will look into it.
Once it is fixed, we will inform you.

Sincerely,
Wade
E-iceblue support team
User avatar

Wade.shao
 
Posts: 32
Joined: Thu Mar 22, 2018 8:23 am

Fri Jun 08, 2018 3:57 am

Dear Dharam,

Glad to inform you that the issue is fixed in Spire.XLS Pack(Hotfix) Version:8.6.1.
Looking forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Jun 12, 2018 7:10 am

Dear Dharam,

Hope you are doing well.
Did you try the hotfix ? Has your issue been resolved ?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Jul 30, 2018 9:54 am

hotfix available in paid version right?

I wanna use this functionality in free version , is it possible?

Dharam
 
Posts: 13
Joined: Tue May 08, 2018 8:51 am

Mon Jul 30, 2018 10:29 am

Dear Dharam,

Yes, the hotfix is available in paid version. I am sorry that this functionality will not be updated in free version.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Mon Jul 30, 2018 10:42 am

Thanks amy for a quic reply :)

Dharam
 
Posts: 13
Joined: Tue May 08, 2018 8:51 am

Tue Jul 31, 2018 1:24 am

Dear Dharam,

Any question, please feel free to contact us.
Have a nice day:)

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Oct 16, 2018 6:57 pm

I want to make pivotal table header text style as word wrap. How can I do that. I am using Free Spire.net

pradhan.subhankar@gmail.com
 
Posts: 8
Joined: Fri Oct 12, 2018 12:42 am

Tue Oct 16, 2018 7:00 pm

I want to make pivotal table header text style as word wrap. How can I do that. I am using Free Spire.net

pradhan.subhankar@gmail.com
 
Posts: 8
Joined: Fri Oct 12, 2018 12:42 am

Wed Oct 17, 2018 8:24 am

Hello Pradhan,

Thanks for your interests in our Spire.XLS.
Theoretically, to make pivot table header text style as word warp, we could set sheet.Range["G1"].IsWrapText = true;. But there is no effect when setting this for a cell range of a pivot table. I have posted it to our Dev team for investigating and fixing, if there is any update, I will let you know immediately. Sorry for the inconvenience caused.

Sincerely,
Lisa
E-iceblue support team PivotStyle
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Oct 17, 2018 1:25 pm

Thanks Lisa for updating this.I need resolution very urgently. Can you please help me on this.

pradhan.subhankar@gmail.com
 
Posts: 8
Joined: Fri Oct 12, 2018 12:42 am

Return to Spire.XLS