GroupDocs.Editor for Java API เป็นตัวเลือกที่เหมาะสมในการแก้ไขเอกสาร Microsoft Word, Excel, PowerPoint, Open Office และงานนำเสนอ GroupDocs.Editor เป็น API แบบสแตนด์อโลนที่เหมาะสำหรับระบบฝั่งเซิร์ฟเวอร์และระบบแบ็คเอนด์ที่ต้องการประสิทธิภาพสูง ไม่ได้ขึ้นอยู่กับซอฟต์แวร์ใดๆ เช่น Microsoft หรือ Open Office
GroupDocs.Editor for Java เป็นวิธีที่ง่ายและตรงไปตรงมาสำหรับนักพัฒนาในการแก้ไขไฟล์ OTS โดยใช้โค้ดสองสามบรรทัด
SpreadsheetEditOptions
สำหรับรูปแบบไฟล์ OTSEditor.Edit()
และรับเอกสาร OTS ในรูปแบบ HTML ที่แก้ไขได้อย่างง่ายดายด้วยตัวแก้ไข WYSIWYG ใดๆEditor.Save()
และบันทึกไฟล์ OTS ที่แก้ไขแล้วโดยใช้คลาส SpreadsheetSaveOptions
การแก้ไขเอกสารขั้นพื้นฐานด้วย GroupDocs.Editor for Java API สามารถทำได้โดยใช้ขั้นตอนง่ายๆ ไม่กี่ขั้นตอน API ของเราได้รับการสนับสนุนบนแพลตฟอร์มและระบบปฏิบัติการหลักทั้งหมด ก่อนดำเนินการโค้ดด้านล่าง โปรดตรวจสอบให้แน่ใจว่าคุณได้ติดตั้งข้อกำหนดเบื้องต้นต่อไปนี้ไว้ในระบบของคุณแล้ว
// Load the OTS file into Editor with the optional SpreadsheetLoadOptions
Editor editor = new Editor("source.ots", new SpreadsheetLoadOptions());
// Create and adjust the edit options
SpreadsheetEditOptions editOptions = new SpreadsheetEditOptions();
editOptions.setWorksheetIndex(1);//select a tab (worksheet) to edit
// Open input OTS document for edit — obtain an intermediate document, that can be edited
EditableDocument beforeEdit = editor.edit(editOptions);
// Grab OTS 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 a save options and select a desired output format
SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions(SpreadsheetFormats.Ots);
// Save edited OTS document to the file
editor.save(afterEdit, "edited.ots", saveOptions);
แก้ไข OTS ทันทีโดยไปที่เว็บไซต์ GroupDocs.Editor Live Demos การสาธิตสดมีประโยชน์ดังต่อไปนี้
ไม่จำเป็นต้องดาวน์โหลดเอพีไอ
ไม่จำเป็นต้องเขียนรหัสใดๆ
เพียงแค่อัปโหลดแฟ้มแหล่งที่มา
รับลิงค์ดาวน์โหลดเพื่อบันทึกไฟล์
คุณยังสามารถแก้ไขรูปแบบไฟล์อื่นๆ ได้อีกด้วย โปรดดูรายการทั้งหมดด้านล่าง
(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)
(Comma Seperated Values)
(Rich Text Format)
(OpenDocument Text File Format)
(Outlook Message Item File)