I am trying to write a dictionary into a .xlsx document using the following code:
example_dict = {"Column 1": [1, 2, 3], "Column 2": [4, 5, 6], "Column 3": [7, 8, 9]}
cont = pyexcel.utils.dict_to_array(example_dict)
sheet = pyexcel.Sheet(cont)
sheet.save_as("output.xlsx")
Code reference http://docs.pyexcel.org/en/v0.1.1/tutorial.html#writing-a-single-sheet-excel-file.
I am getting the error AttributeError: 'module' object has no attribute 'utils'.
Precisely, I am trying to fill the key entries into columns rather than rows (filling by rows is the default way). I have not been able to come across anything helpful so far, and would really appreciate any help in fixing the error.
You have linked to a very old version of the pyexcel documentation (v0.1.1). You are probably using a newer version.
The current version of the documentation (v0.7.0) gives the following example to complete the same task: