ดูและแก้ไขข้อมูลเมตา PPT ด้วย Python

สร้างแอป Python ที่อ่านและแก้ไขคุณสมบัติในตัวและคุณสมบัติกำหนดเองของงานนำเสนอด้วย Aspose.Slides

ดูและปรับเปลี่ยนข้อมูลเมตา PPT ด้วย Python

Aspose.Slides for Python via .NET ช่วยให้คุณอ่านและอัปเดตข้อมูลเมตาในตัว รวมถึงเพิ่ม อัปเดต หรือลบคุณสมบัติเอกสารกำหนดเองในงานนำเสนอ PPT เข้าถึงออบเจ็กต์ IDocumentProperties ผ่าน Presentation.document_properties แก้ไข แล้วบันทึกงานนำเสนอในรูปแบบ PPT

อัปเดตคุณสมบัติในตัวของ PPT – Python

with slides.Presentation("presentation.ppt") as presentation:
    document_properties = presentation.document_properties
    document_properties.author = "Aspose.Slides for Python"
    document_properties.title = "Quarterly Review"
    document_properties.subject = "Presentation Metadata"
    document_properties.comments = "Built-in properties updated with Aspose.Slides."
    document_properties.manager = "Project Manager"

    presentation.save("presentation_with_updated_metadata.ppt", slides.export.SaveFormat.PPT)

เพิ่มและลบคุณสมบัติกำหนดเองของ PPT – Python

with slides.Presentation("presentation.ppt") as presentation:
    document_properties = presentation.document_properties
    document_properties.set_custom_property_value("Department", "Engineering")
    document_properties.set_custom_property_value("Review Count", 3)
    document_properties.set_custom_property_value("Obsolete Status", "Draft")
    document_properties.remove_custom_property("Obsolete Status")

    presentation.save("presentation_with_custom_metadata.ppt", slides.export.SaveFormat.PPT)

วิธีแก้ไขข้อมูลเมตา PPT ด้วย Python

ทำตามขั้นตอนเหล่านี้เพื่อแก้ไขข้อมูลเมตาในไฟล์ PPT

  1. เปิดไฟล์ PPT ด้วย Presentation
  2. เข้าถึงออบเจ็กต์ IDocumentProperties ผ่าน Presentation.document_properties
  3. อัปเดตคุณสมบัติในตัว หรือใช้ set_custom_property_value และ remove_custom_property สำหรับคุณสมบัติกำหนดเอง
  4. บันทึกงานนำเสนอด้วย Presentation.save และ SaveFormat.PPT

สร้างด้วย Aspose.Slides

ดูและแก้ไขข้อมูลเมตา PPT ออนไลน์

แอป Aspose.Slides Metadata ฟรีนี้สร้างด้วย Aspose.Slides for Python via .NET ซึ่งเป็น API เดียวกับโค้ดด้านบน เปิดแอปแล้วดูว่า API ทำอะไรได้บ้างกับไฟล์ PPT ของคุณเอง

  • ทำงานในเบราว์เซอร์ ไม่ต้องติดตั้งสิ่งใด
  • ดูว่า Aspose.Slides อ่านและเขียนคุณสมบัติอย่างไรก่อนเขียนโค้ด
  • ดูและแก้ไขคุณสมบัติในตัวและคุณสมบัติกำหนดเองของไฟล์ PPT
  • บันทึกและดาวน์โหลดไฟล์ที่อัปเดตแล้ว

รูปแบบข้อมูลเมตาอื่นที่รองรับ

ด้วย Python คุณยังสามารถจัดการข้อมูลเมตาของรูปแบบงานนำเสนออื่นที่รองรับได้