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 Sep 18, 2014 9:17 am

Hi, is possibile know the number of last column
in a pivot ??
(i want hidden last column in a pivot)

ict@sogedin.it
 
Posts: 63
Joined: Mon Jul 15, 2013 2:06 pm

Thu Sep 18, 2014 10:16 am

Hello,

Thans for your inquiry.
We will investigate and update to you ASAP.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Sep 19, 2014 2:40 am

Hello,

Thanks for your waiting.
Please try the following method.
Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile( "pt.xlsx");
Worksheet sheet = workbook.Worksheets["Pivot Table"];
CellRange cr = sheet.PivotTables[0].Location;
sheet.HideColumn(cr.LastColumn);
workbook.SaveToFile("Ptresult.xlsx",ExcelVersion.Version2010);

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed Sep 24, 2014 9:42 am

Hello,

Has the issue been resolved? Could you please give us some feedback if convenience?

If there are any questions, welcome to get it back to us.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.XLS