Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
excel data erase
#2
Looks like have to modify a copy with xlutils,then write to a new document with those changes.
from xlutils.copy import copy
from xlrd import open_workbook

w = copy(open_workbook('example.xls'))
w.get_sheet(0).write(0, 0, "foo")
w.save('example_1.xls')
I use Pandas always for stuff like this df.read_excel(),
when in a DataFrame(look like Excel in a NoteBook) then the power is great for all kind of stuff.
When finish with changes df.to_excel()
Reply


Messages In This Thread
excel data erase - by d8a988 - Apr-27-2020, 10:04 AM
RE: excel data erase - by snippsat - Apr-27-2020, 05:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Data Sorting and filtering(From an Excel File) PY_ALM 0 1,754 Jan-09-2023, 08:14 PM
Last Post: PY_ALM
  Help with poorly formatted excel data armitron121 1 2,409 Jan-13-2022, 07:31 AM
Last Post: paul18fr
  Exporting data frame to excel dyerlee91 0 2,202 Oct-05-2021, 11:34 AM
Last Post: dyerlee91
  [Pandas] Write data to Excel with dot decimals manonB 1 8,308 May-05-2021, 05:28 PM
Last Post: ibreeden
  Python read Excel cell data validation anantpatil 0 5,093 Jan-31-2020, 04:57 PM
Last Post: anantpatil
  Need Help With Filtering Data For Excel Files Using Pandas eddywinch82 9 10,102 Aug-06-2019, 03:44 PM
Last Post: eddywinch82
  Aligning excel data gat 1 3,045 Jun-17-2019, 07:05 PM
Last Post: michalmonday
  Copy raw data in excel to another new excel file keerthiprashanth 5 5,174 Oct-20-2018, 10:13 AM
Last Post: volcano63
  I'm working onn below code to extract data from excel using python kiran 1 4,083 Oct-24-2017, 01:42 PM
Last Post: kiran
  Write data into existing Excel (xlsx) file with multiple sheets BNB 1 16,240 Jun-01-2017, 04:22 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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