1
A
回答
0
我希望我不晚到晚會,因爲這個問題到現在已經有一個月了,但是我猜,遲到總比沒有晚。
如果您知道類別的指數,您可以使用此代碼:
// Replace ActiveChart with your specific chart.
// The index of the ChartGroup is always 1,
// unless you have multiple chart groups in your chart.
var chartGroup = (ChartGroup)_application.ActiveChart.ChartGroups(1);
var category = (ChartCategory)chartGroup.FullCategoryCollection(Index: 2);
category.IsFiltered = true;
如果你只知道這個名字,你需要遍歷類別:
// If you want to skip the already hidden categories,
// you can use .CategoryCollection() instead of .FullCategoryCollection() two times.
var categories = (CategoryCollection)chartGroup.FullCategoryCollection();
for (int i = 1; i <= categories.Count; i++)
{
var category = (ChartCategory)chartGroup.FullCategoryCollection(i);
if (category.Name == "W2 - 13/01/17")
category.IsFiltered = true;
}
相關問題
- 1. 無法設置範圍類的隱藏屬性c#excel interop
- 2. 在excel中隱藏圖表VBA
- 3. 用C#Interop隱藏MS-Project中的列
- 4. 使用MS Office Interop隱藏來自Powerpoint圖表的數據
- 5. 如何隱藏功能圖片出現在類別列表中?
- 6. 按類別隱藏多個錶行
- 7. 如何隱藏PHP中的類別?
- 8. 隱藏Magento中的某些類別?
- 9. 如何使用Interop C隱藏Excel列和行#
- 10. 在Woocommerce中隱藏宏類別中的子類別產品
- 11. 如何在Excel圖表中顯示隱藏行,但不顯示隱藏列?
- 12. 在wordpress中隱藏類別列表中的特定帖子
- 13. excel中的隱藏數據
- 14. 隱藏excel中的行組
- 15. 表中隱藏類型
- 16. 設置系列圖表(Interop Excel)
- 17. 如何在excel VBA中隱藏圖片?
- 18. 如何從Excel工作表中刪除隱藏的列/行?
- 19. Excel Interop:分組列
- 20. 隱藏特定類別中環
- 21. 在WordPress中隱藏「無類別」
- 22. 在Wordpress中隱藏ONE類別名稱
- 23. Excel Interop - 類型未註冊
- 24. 如何隱藏類別視圖(MAGENTO)中的基準價格?
- 25. Excel - 如何隱藏圖表數據條中的值
- 26. 在excel圖表中隱藏一個特定的系列(行)
- 27. 刪除/隱藏的傳說圖表Excel中
- 28. 取消隱藏非常隱藏的表格Excel VBA
- 29. 隱藏doxygen的類圖
- 30. Excel Interop:應用程序和應用程序類的區別