Python Forum

Full Version: python openpyxl writing data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I can write numerical data to the excel file. But it saves as a text. I am using "openpyxl" module for creating, writing and saving excel file.
Can anyone help me to convert the data to numerical data in excel file.

Any help is appreciated.

Thanks,
Bikram
you forgot to post your code
Sorry !!
I solved this problem.
I have anew problem. I ma not able to delete a Bar Chart which i have created using OPENPYXL in PYTHON.
Here is the code:
chart=BarChart() 
data=Reference(sheet2,min_row=2, max_row=sheet2.max_row, min_col=3)
category=Reference(sheet2,min_col=2, min_row=2, max_row=sheet2.max_row)
chart.add_data(data, titles_from_data=False)
chart.set_categories(category)
sheet2.add_chart(chart,"M3")
chart.title="Count"
chart.x_axis.title= "Time"
chart.y_axis.title="Reason"