C++ ile WorkbookMetadata kullanımıyla
Contents
[
Hide
]
Aspose.Cells, metaveri bilgilerini düzenlemek için hafif bir çalışma kitabı sürümünü belleğe yüklemenize olanak tanır. Lütfen çalışma kitabını yüklemek için WorkbookMetadata sınıfını kullanın.
Aşağıdaki örnek kod, bir çalışma kitabının özel belge özelliklerini düzenlemek için WorkbookMetadata sınıfını kullanır. Çalışma kitabını Workbook sınıfı kullanarak açtıktan sonra belge özelliklerini okuyabilirsiniz. İşte WorkbookMetadata sınıfını kullanarak örnek kod.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
using namespace Aspose::Cells::Metadata;
using namespace Aspose::Cells::Properties;
int main()
{
Aspose::Cells::Startup();
U16String srcDir(u"..\\Data\\01_SourceDirectory\\");
MetadataOptions options(MetadataType::Document_Properties);
WorkbookMetadata meta(srcDir + u"Sample1.xlsx", options);
meta.GetCustomDocumentProperties().Add(u"test", u"test");
meta.Save(srcDir + u"Sample2.out.xlsx");
Workbook w(srcDir + u"Sample2.out.xlsx");
std::cout << w.GetCustomDocumentProperties().Get(u"test").ToString().ToUtf8() << std::endl;
std::cout << "Press any key to continue..." << std::endl;
std::cin.get();
Aspose::Cells::Cleanup();
}