تغيير تخطيط جدول الدوران
كيفية تغيير تخطيط الجدول المحوري في MS-Excel
يسمح Microsoft Excel لك بتغيير تخطيط جدول البيانات المحورية باستخدام أوامر القائمة PivotTable Tools > Design > Report Layout. يمكنك تغيير التخطيط في هذه الأشكال الثلاثة
إظهار بتنسيق مضغوط إظهار بتنسيق مخطط إظهار بتنسيق جدولي
كيفية تغيير تخطيط الجدول المحوري باستخدام Aspose.Cells for Node.js via C++
توفر مكتبة Aspose.Cells for Node.js via C++ أيضًا طرق PivotTable.showInCompactForm()، PivotTable.showInOutlineForm() و PivotTable.showInTabularForm() لتغيير تخطيط الجدول المحوري بهذه الأشكال الثلاثة.
الكود المثالي
يظهر الرمز البريدي العيني التالي جدول البيانات المحوري أولاً في النموذج المضغوط، ثم يظهر جدول البيانات المحوري في النموذج المخطط وأخيرًا يظهر جدول البيانات المحوري في النموذج الجدولي.
const AsposeCells = require("aspose.cells.node"); | |
//For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
//The path to the documents directory. | |
var dataDir = RunExamples.GetDataDir(".") | |
//Create workbook object from source excel file | |
var workbook = new AsposeCells.Workbook(dataDir + "pivotTable_sample.xlsx"); | |
//Access first worksheet | |
var worksheet = workbook.getWorksheets().get(0); | |
//Access first pivot table | |
var pivotTable = worksheet.getPivotTables().get(0); | |
//1 - Show the pivot table in compact form | |
pivotTable.showInCompactForm(); | |
//Refresh the pivot table | |
pivotTable.refreshData(); | |
pivotTable.calculateData(); | |
//Save the output | |
workbook.save(dataDir + "CompactForm_out.xlsx"); | |
//2 - Show the pivot table in outline form | |
pivotTable.showInOutlineForm(); | |
//Refresh the pivot table | |
pivotTable.refreshData(); | |
pivotTable.calculateData(); | |
//Save the output | |
workbook.save(dataDir + "OutlineForm_out.xlsx"); | |
//3 - Show the pivot table in tabular form | |
pivotTable.showInTabularForm(); | |
//Refresh the pivot table | |
pivotTable.refreshData(); | |
pivotTable.calculateData(); | |
//Save the output | |
workbook.save(dataDir + "TabularForm_out.xlsx"); |