Jython 中的 Hello World
Contents
[
Hide
]
Aspose.Cells - Hello World
使用附加文档Aspose.Cells Java 对于 Jython.在这里您可以看到示例代码。
Jython代码
from asposewords import Settings
from com.aspose.Cells import Document
from com.aspose.Cells import ImportFormatMode
class HelloWorld:
def __init__(self):
dataDir = Settings.dataDir + 'quickstart/'
workbook = Workbook()
sheet = workbook.getWorksheets().get(0)
cell = sheet.getCells().get("A1")
cell.setValue("Hello World!")
file_format_type = FileFormatType
workbook.save(dataDir + "HelloWorld.xls" , file_format_type.EXCEL_97_TO_2003 )
print "Document has been saved, please check the output file.";
if __name__ == '__main__':
HelloWorld()
下载运行代码
下载**附加文件 (Aspose.Cells)**来自以下任何社交编码网站: