GroupDocs.Editor for Java API เป็นตัวเลือกที่เหมาะสมในการแก้ไขเอกสาร Microsoft Word, Excel, PowerPoint, Open Office และงานนำเสนอ GroupDocs.Editor เป็น API แบบสแตนด์อโลนที่เหมาะสำหรับระบบฝั่งเซิร์ฟเวอร์และระบบแบ็คเอนด์ที่ต้องการประสิทธิภาพสูง ไม่ได้ขึ้นอยู่กับซอฟต์แวร์ใดๆ เช่น Microsoft หรือ Open Office
GroupDocs.Editor for Java เป็นวิธีที่ง่ายและตรงไปตรงมาสำหรับนักพัฒนาในการแก้ไขไฟล์ DOCM โดยใช้โค้ดสองสามบรรทัด
WordProcessingEditOptions
สำหรับรูปแบบไฟล์ DOCMEditor.Edit()
และรับเอกสาร DOCM ในรูปแบบ HTML ที่แก้ไขได้อย่างง่ายดายด้วยตัวแก้ไข WYSIWYG ใดๆEditor.Save()
และบันทึกไฟล์ DOCM ที่แก้ไขแล้วโดยใช้คลาส WordProcessingSaveOptions
การแก้ไขเอกสารขั้นพื้นฐานด้วย GroupDocs.Editor for Java API สามารถทำได้โดยใช้ขั้นตอนง่ายๆ ไม่กี่ขั้นตอน API ของเราได้รับการสนับสนุนบนแพลตฟอร์มและระบบปฏิบัติการหลักทั้งหมด ก่อนดำเนินการโค้ดด้านล่าง โปรดตรวจสอบให้แน่ใจว่าคุณได้ติดตั้งข้อกำหนดเบื้องต้นต่อไปนี้ไว้ในระบบของคุณแล้ว
// Load the DOCM file into Editor with the optional WordProcessingLoadOptions
Editor editor = new Editor("source.docm", new WordProcessingLoadOptions());
// Create and adjust the edit options
WordProcessingEditOptions editOptions = new WordProcessingEditOptions();
// Open input DOCM document for edit — obtain an intermediate document, that can be edited
EditableDocument beforeEdit = editor.edit(editOptions);
// Grab DOCM document content and associated resources from editable document
string content = beforeEdit.getContent();
// Send the content to WYSIWYG-editor, edit it there, and send edited content back to the server-side
// This step simulates a such operation
string updatedContent = content.replace("Subtitle", "Edited subtitle");
// Grab edited content and resources from WYSIWYG-editor and create a new EditableDocument instance from it
EditableDocument afterEdit = EditableDocument.fromMarkup(updatedContent, null);
// Create a save options and select a desired output format
WordProcessingSaveOptions saveOptions = new WordProcessingSaveOptions(WordProcessingFormats.Docm);
// Save edited DOCM document to the file
editor.save(afterEdit, "edited.docm", saveOptions);
แก้ไข DOCM ทันทีโดยไปที่เว็บไซต์ GroupDocs.Editor Live Demos การสาธิตสดมีประโยชน์ดังต่อไปนี้
ไม่จำเป็นต้องดาวน์โหลดเอพีไอ
ไม่จำเป็นต้องเขียนรหัสใดๆ
เพียงแค่อัปโหลดแฟ้มแหล่งที่มา
รับลิงค์ดาวน์โหลดเพื่อบันทึกไฟล์
คุณยังสามารถแก้ไขรูปแบบไฟล์อื่นๆ ได้อีกด้วย โปรดดูรายการทั้งหมดด้านล่าง
(Microsoft Word Binary Format)
(Office 2007+ Word Document)
(Microsoft Word Template File )
(Microsoft Excel Spreadsheet (Legacy))
(Open XML Workbook)
(Macro-enabled Spreadsheet)
(Microsoft PowerPoint 97-2003)
(Open XML presentation Format)
(Macro-enabled Presentation File)
(Open Ebook Format)
(Open eBook File)
(Hyper Text Markup Language)
(Web Page Archive Format)
(Text Document)
(XML File)
(Comma Seperated Values)
(Rich Text Format)
(OpenDocument Text File Format)
(Outlook Message Item File)
(E-Mail Message)