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 Oct 02, 2014 1:34 pm

News autofit field pivot ??

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

Fri Oct 03, 2014 3:20 am

Hello,

Thanks for your inquiry.
Please try the below code snippet:

Code: Select all
   Worksheet sheet = workbook.Worksheets["Pivot Table"];
            sheet.AllocatedRange.AutoFitColumns();
            sheet.AllocatedRange.AutoFitRows();


Best wishes,
Amy
E-iceblue support team
User avatar

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

Return to Spire.XLS