線上編輯 XLS 文檔
- 透過上傳導入 XLS 檔案。
- 透過拖放註釋應用程式在放置區域內點擊來完成此操作。
- 根據 XLS 檔案的大小和網路速度,等待幾秒鐘。
- 輸入要搜尋和編輯的文本
- 輸入要編輯的替換文字
- 按下“編輯”按鈕
- 立即下載密文文件。
透過 Android 應用程式編輯 XLS 文件
- 新增庫引用到android項目
- 使用Workbook類別載入XLS文件
- 使用 getWorksheets().get(index) 取得相關工作表
- 使用 FindOptions 類別並設定選項
- 迭代每個單元格並使用 putValue 更新值
- 儲存 XLS 電子表格
代碼:編輯 XLS 電子表格
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Workbook workbook = new Workbook(dataDir + "sourceFile.xls"); | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
CellArea area = CellArea.createCellArea("E3", "H6"); | |
FindOptions opts = new FindOptions(); | |
opts.setLookInType(LookInType.VALUES); | |
opts.setLookAtType(LookAtType.ENTIRE_CONTENT); | |
opts.setRange(area); | |
Cell cell = null; | |
do { | |
cell = worksheet.getCells().find("search", cell, opts); | |
if (cell == null) | |
break; | |
cell.putValue("replace"); | |
} while (true); | |
workbook.save(dataDir + "output.xls"); |
開發 XLS 修訂 Android 應用程式
需要開發 XLS 修訂應用程式或實用程式? 借助
Aspose.Cells for Android via Java
(
Aspose.Total for Android via Java
的子 API),任何 Android 開發人員都可以將上述 API 程式碼整合到其文件編輯應用程式中。 強大的 Android 庫允許對任何電子表格編輯解決方案進行程式設計。 而且它可以支援許多流行的格式,包括XLS格式。