Behaviour of IsAutoFormat option in PivotTable

Hi,

Could you please explain how works the ‘IsAutoFormat’ in pivot table?
I tried to change AutoFormat (‘None’), PivotTable styles, cells formatting and sizes, but it always equals ‘true’.

I use Aspose.Cells v7.0.3.1 and document made in Excel 2010.

Thank you,
Alex Shloma

Hi,

Thanks for your posting and considering Aspose.Cells for .NET.

IsAutoFormat/AutoFormatType is valid for xls files and for xlsx files, please use Pivot.PivotTableStyleType

Thanks for quick reply.

But I don’t need to create documents with this option. I need to analyze documents from users.
I check the option state, but it always the same. ‘AutoFormat’ is ‘Classic’ by default, but when I set it to ‘None’ the option still equal ‘true’.
So I don’t understand how it works. Please clarify.

Thank you,
Alex Shloma

Hi,

Thanks for your explanation.

I think, you should only check AutoFormat for xls file. Xls is older format. For later format like Xlsx, Xlsm etc, you should ignore what AutoFormat says, only check PivotTableStyleType.

Hi,

Please see my comments below:

mshakeel.faiz:

I think, you should only check AutoFormat for xls file. Xls is older format.

I have the same result with *.xls - ‘IsAutoFormat’ is always equal ‘true’

mshakeel.faiz:

For later format like Xlsx, Xlsm etc, you should ignore what AutoFormat says, only check PivotTableStyleType.

It’s two different style. The users can convert documents with old styles to new format and they can use old styles in new documents. New documents may have the old format, the new format or nothing (formatted cells).

Thank you,
Alex Shloma

Hi,

Please create a sample console application and sample source xls/xlsx files to illustrate your issue and also help us with screenshots. I will look into it and log your issue in our database for a development team to review it and fix it.

Hi,

I created simple console application and sample excel documents with different configurations of styles. In the application you could see that "IsAutoFormat’ is always equals ‘true’.
The application and Aspose.Cells.dll should be in the root directory of samples.

Thank you,
Alex Shloma

Hi,

Thanks for your posting and sample application.

We have logged this issue in our database. We will look into it and help you asap.

This issue has been logged as CELLSNET-40122.

Hi,


For your issue, the IsAutoFormat is a flag in the pivot table’s settings. You can see the details in the attached picture(“IsAutoFormat.png”). If you uncheck this checkbox in the setting, then this flag will be false, otherwise this flag is true.

Thanks for your understanding!

Thanks for your help!

Before I thought that it’s only inner Excel state, but now I found it. It was renamed in new versions of Excel to ‘Autofit column widths on update’ (Options -> Layout & Format).
It would be nice if you add this information to components documentation.

Best regards,
Alex Shloma