1. Python install

  - homepage link

    : https://www.python.org/downloads/

 

 

2. PyCharm (IDE) install

  - homepage link

    : https://www.jetbrains.com/

 

  - download link

    : https://www.jetbrains.com/pycharm/download/#section=windows

    : Community : free

 

3. openpyxl library install (Python library to read/write Excel)

  -  Pycharm -> File -> settings -> Project interpreter ->

     Available Packages -> openpyxl download

 

 

4. example source code

from openpyxl import Workbook


MyTestExcelFile = Workbook() # Create excel file


TestWorksheet = MyTestExcelFile.active


TestWorksheet.title = "first_Sheet" # Worksheet name
TestWorksheet["A1"] = "Hello World" # A1 cell data set


print(TestWorksheet["A1"].value) # console output

MyTestExcelFile.save("CreateTest.xlsx") # Save excel file

# openpyxl turorial link

  - https://openpyxl.readthedocs.io/en/latest/index.html

'Office' 카테고리의 다른 글

181225 google spreadsheet  (1) 2018.12.25

+ Recent posts