Determina se una forma è una forma di smart art con C++
Contents
[
Hide
]
Possibili Scenari di Utilizzo
I Smart Art Shapes sono forme speciali in Microsoft Excel che ti consentono di creare diagrammi complessi in modo automatico. È possibile verificare se la forma è una forma di arte intelligente o una forma normale utilizzando la proprietà Shape.IsSmartArt.
Determinare se la forma è una forma SmartArt
Il seguente codice di esempio carica il file di Excel di esempio contenente una forma di arte intelligente come mostrato in questa schermata. Quindi stampa il valore della proprietà Shape.IsSmartArt della prima forma. Si prega di consultare l’output della console del codice di esempio fornito di seguito.
Codice di Esempio
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
using namespace Aspose::Cells::Drawing;
int main()
{
Aspose::Cells::Startup();
// Load the sample smart art shape - Excel file
U16String inputFilePath(u"sampleSmartArtShape.xlsx");
Workbook wb(inputFilePath);
// Access first worksheet
WorksheetCollection sheets = wb.GetWorksheets();
Worksheet ws = sheets.Get(0);
// Access first shape
ShapeCollection shapes = ws.GetShapes();
Shape sh = shapes.Get(0);
// Determine if shape is smart art
std::cout << "Is Smart Art Shape: " << sh.IsSmartArt() << std::endl;
Aspose::Cells::Cleanup();
}
Output della console
Is Smart Art Shape: True