Excel Dosyasının Dilini Yerleşik Belge Özellikleri ile Belirtme (C++ ile)
Olası Kullanım Senaryoları
Bir Excel dosyasının dilini değiştirmek için dosyaya sağ tıklayın ve özellikler > ayrıntılar menüsünü seçin, sonra Dil alanını düzenleyin. Programatik olarak değiştirmek için BuiltInDocumentPropertyCollection.GetLanguage() özelliğini kullanın.
Dahili Belge Özelliklerini Kullanarak Excel Dosyasının Dilini Belirtme
Aşağıdaki örnek kod, bir çalışma kitabı oluşturur ve içindeki Dil adlı yerleşik belge özelliğini değiştirir. Lütfen bu kodla oluşturulan çıktı Excel dosyasını ve değiştirilmiş Dil alanını gösteren ekran görüntüsünü inceleyin.
Örnek Kod
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
using namespace Aspose::Cells::Properties;
int main()
{
Aspose::Cells::Startup();
// Create workbook object
Workbook wb;
// Access built-in document property collection
BuiltInDocumentPropertyCollection bdpc = wb.GetBuiltInDocumentProperties();
// Set the language of the Excel file
bdpc.SetLanguage(u"German, French");
// Save the workbook in xlsx format
wb.Save(u"..\\Data\\02_OutputDirectory\\outputSpecifyLanguageOfExcelFileUsingBuiltInDocumentProperties.xlsx", SaveFormat::Xlsx);
std::cout << "Language set successfully!" << std::endl;
Aspose::Cells::Cleanup();
}