Python Forum
python openpyxl writing data
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python openpyxl writing data
#1
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
Reply
#2
you forgot to post your code
Reply
#3
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"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Issue in writing sql data into csv for decimal value to scientific notation mg24 8 2,873 Dec-06-2022, 11:09 AM
Last Post: mg24
  openpyxl convert data to float jacklee26 13 5,712 Nov-19-2022, 11:59 AM
Last Post: deanhystad
  Create a function for writing to SQL data to csv mg24 4 1,111 Oct-01-2022, 04:30 AM
Last Post: mg24
  Need Help writing data into Excel format ajitnayak87 8 2,438 Feb-04-2022, 03:00 AM
Last Post: Jeff_t
  Fastest Way of Writing/Reading Data JamesA 1 2,138 Jul-27-2021, 03:52 PM
Last Post: Larz60+
Smile Set 'Time' format cell when writing data to excel and not 'custom' limors 3 6,195 Mar-29-2021, 09:36 PM
Last Post: Larz60+
  Python Openpyxl is unable to check from Column 6 onwards Skye 0 1,684 Oct-13-2020, 06:11 AM
Last Post: Skye
  Formatting Data/Time with Pyodbc and openpyxl bearcats6001 0 2,251 Aug-17-2020, 03:44 PM
Last Post: bearcats6001
  writing data to a csv-file apollo 1 2,326 Jul-03-2020, 02:28 PM
Last Post: DeaD_EyE
  openpyxl Pasting data to different cells Kristenl2784 3 7,557 Jun-15-2020, 08:50 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020