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 CSV bằng một vài dòng mã.
Editor
với đường dẫn tệp bắt buộc hoặc luồng byte và tải tệp CSVDelimitedTextEditOptions
cho định dạng tệp CSV và chỉ định dấu phân tách chuỗi bắt buộc trong hàm tạoEditor.Edit ()
và lấy tài liệu CSV ở định dạng HTML có thể dễ dàng chỉnh sửa bằng bất kỳ trình biên tập WYSIWYG nàoEditor.Save ()
và lưu tệp CSV đã chỉnh sửa bằng cách sử dụng cá thể lớp DelimitedTextSaveOptions
với dấu phân tách mong muốnChỉ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 CSV file into Editor with no extra loading options
Editor editor = new Editor("source.csv");
// Create edit options for delimited text and specify a mandatory separator in the constructor
DelimitedTextEditOptions editOptions = new DelimitedTextEditOptions(",");
// Open input CSV document for edit — obtain an intermediate document, that can be edited
EditableDocument beforeEdit = editor.edit(editOptions);
// Grab CSV 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("Cell Text", "Edited Cell Text");
// Grab edited content and resources from WYSIWYG-editor and create a new EditableDocument instance from it
EditableDocument afterEdit = EditableDocument.fromMarkup(updatedContent, null);
// Create save options for delimited text and specify a mandatory separator in the constructor
DelimitedTextSaveOptions saveOptions = new DelimitedTextSaveOptions(",");
// Save edited CSV document to the file
editor.save(afterEdit, "edited.csv", saveOptions);
Chỉnh sửa CSV 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 2007 Marco File)
(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)
(Tab Seperated Values)
(Rich Text Format)
(OpenDocument Text File Format)
(Outlook Message Item File)