All Kingsoft Office applications (Kingsoft Writer, Kingsoft Spreadsheets and Kingsoft Presentation) are API compatible with Microsoft Office application automation. This allows you to automate Kingsoft applications through VBA. The example provided here shows how to automate Kingsoft Spreadsheets using VBScript. The original Microsoft Excel script came from Microsoft KB article 247412.
Automating Kingsoft Spreadsheets
Before you can use any scripts written for Microsoft Excel, you will need to replace all instances of Excel.Application with et.Application. Copy the below code into a text file named example.vbs. This code will open Kingsoft Spreadsheets, add two rows of data, and save the file to C:\TEMP\example.xls.
‘Start a new workbook in Kingsoft Presentation
Set oExcel = CreateObject("et.Application")
Set oBook = oExcel.Workbooks.Add
‘Add data to cells of the first worksheet in the new workbook
Set oSheet = oBook.Worksheets(1)
oSheet.Range("A1").Value = "Last Name"
oSheet.Range("B1").Value = "First Name"
oSheet.Range("A1:B1").Font.Bold = True
oSheet.Range("A2").Value = "Doe"
oSheet.Range("B2").Value = "John"
‘Save the Workbook and Quit Excel
- Kingsoft Office 2009 supports Microsoft Office (Word/Excel) API compatible OLE/C...
- Kingsoft Office 2009 is compatible with Microsoft Office Open XML (OOXML) format...
- Pivot table function in Kingsoft Spreadsheets is an alternative to Microsoft Exc...
- Kingsoft Spreadsheets can convert a Microsoft Excel workbook (XLS/XLSX/CSV/DBF) ...
- Kingsoft Spreadsheets is an alternative to Microsoft Excel 2003 that can open, v...