NisHera
5 years agoValued Contributor
Python imported packages
working with TC python I installed external package XlsxWriter.
according to it's documentation following is a simple function...
import xlsxwriter def aaa():
workbook = xlsxwriter.Workbook('hello_world.xlsx') worksheet = workbook.add_worksheet() worksheet.write('A1', 'Hello world') workbook.close()
which didn't work ....gave me error
Python runtime error. TypeError: 'module' object is not callable
after much reaserching found following works
from xlsxwriter import Workbook def aaaa(): wb = Workbook('abcd.xlsx') worksheet = wb.add_worksheet() worksheet.write('A1','ABCD') wb.close()
why is there a defference of calling packages in TC python?