Skip to content

Getting worksheet #1

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
GasComIT opened this issue Nov 15, 2022 · 1 comment
Open

Getting worksheet #1

GasComIT opened this issue Nov 15, 2022 · 1 comment

Comments

@GasComIT
Copy link

#Get the first worksheet
worksheet=workbook.worksheets[0]

Error: worksheet have no attribute worksheets

??

@amjad-sahi
Copy link

amjad-sahi commented Nov 15, 2022

@GasComIT,

I tested your scenario/case using latest version of Aspose.Cells for Python via .NET using the following sample code and it works fine. The output file is ok.
e.g.
Sample code:

#import the python package
import aspose.cells
from aspose.cells import License,Workbook,FileFormatType
#load a template XLSX file
workbook = Workbook("Book1.xlsx")

#Get the first worksheet
worksheet = workbook.worksheets[0]

#Get the "A1" cell
cells = worksheet.cells
cell = cells.get("A1")

#Write "Hello World" to  "A1" in the first sheet
cell.put_value("Hello World")

#save this workbook to XLSX
workbook.save("out1.xlsx")

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants