API [GroupDocs.Editor for Java] (/vi / editor / java /) là một lựa chọn đúng đắn để chỉnh sửa tài liệu và bản trình bày Microsoft Word, Excel, PowerPoint, Open Office. GroupDocs.Editor là một API độc lập phù hợp với hệ thống phía máy chủ và hệ thống back-end nơi yêu cầu hiệu suất cao. Nó không phụ thuộc vào bất kỳ phần mềm nào như Microsoft hoặc Open Office.
[GroupDocs.Editor for Java] (/vi / editor / java /) cung cấp một cách dễ dàng và đơn giản để nhà phát triển chỉnh sửa tệp DOCM bằng một vài dòng mã.
Editor
với đường dẫn hoặc luồng tệp bắt buộc và lớp WordProcessingLoadOptions
tùy chọn và tải tệp DOCMWordProcessingEditOptions
cho định dạng tệp DOCMEditor.Edit ()
và lấy tài liệu DOCM ở định dạng HTML có thể chỉnh sửa dễ dàng bằng bất kỳ trình soạn thảo WYSIWYG nào.Editor.Save ()
và lưu tệp DOCM đã chỉnh sửa bằng cách sử dụng lớp WordProcessingSaveOptions
Chỉnh sửa tài liệu cơ bản với API GroupDocs.Editor for Java có thể được thực hiện bằng cách triển khai một vài bước đơn giản. API của chúng tôi được hỗ trợ trên tất cả các nền tảng và hệ điều hành chính. Trước khi thực hiện mã bên dưới, hãy đảm bảo rằng bạn đã cài đặt các điều kiện tiên quyết sau trên hệ thống của mình.
// 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);
Chỉnh sửa DOCM ngay bây giờ bằng cách truy cập trang web [GroupDocs.Editor Live Demos] (https://products.groupdocs.app/editor/family) trang web. Bản demo trực tiếp có những lợi ích sau
Không cần phải tải VỀ API
Không cần phải viết bất kỳ mã
chỉ cần tải lên các tập tin nguồn
Nhận liên kết tải xuống để lưu tệp
Bạn cũng có thể chỉnh sửa các định dạng tệp khác. Vui lòng xem danh sách đầy đủ bên dưới.
(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)