Jython da Yeni Excel Dosyasına Çalışsayfa Ekleme
Contents
[
Hide
]
Aspose.Cells - Yeni Excel’e Çalışsayfa Ekleme
Aspose.Cells Java for Jython ile belgeler eklemek için. Burada örnek kodu görebilirsiniz.
Jython Kodu
from aspose-cells import Settings
from com.aspose.cells import Workbook
from com.aspose.cells import SaveFormat
class AddingWorksheetstoNewExcelFile:
def __init__(self):
dataDir = Settings.dataDir + 'WorkingWithWorksheets/AddingWorksheetstoNewExcelFile/'
workbook = Workbook(dataDir + "Book1.xls")
#Adding a new worksheet to the Workbook object
worksheets = workbook.getWorksheets()
sheetIndex = worksheets.add()
worksheet = worksheets.get(sheetIndex)
#Setting the name of the newly added worksheet
worksheet.setName("My Worksheet")
#Saving the Excel file
workbook.save(dataDir + "book.out.xls")
#Print Message
print "Sheet added successfully."
if __name__ == '__main__':
AddingWorksheetstoNewExcelFile()
Çalışan Kodu İndir
Aşağıda belirtilen sosyal kodlama sitelerinden Append Documents (Aspose.Cells) indirin: