Python Forum
Need to copy column of cell values from one workbook to another with openpyxl
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to copy column of cell values from one workbook to another with openpyxl
#3
Thanks I saw that article but it didn't use iter_rows and iter_cols, which I was determined to use. Anyway, I figured out this solution:

for x, rows in enumerate(DateColumnA):
    ws3.cell(row=x+1, column=1).value = rows
    #print(rows)
    wb3.save('C:\\folder\\output.xlsx')
Works great but now I need to determine how to write the data to output.xlsx starting at row 16 instead of row 1 so I don't overwrite the first 16 existing header rows in output.xlsx. Any ideas appreciated.
Reply


Messages In This Thread
RE: Need to copy column of cell values from one workbook to another with openpyxl - by curranjohn46 - Oct-12-2019, 07:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Why is the copy method name in python list copy and not `__copy__`? YouHoGeon 2 449 Apr-04-2024, 01:18 AM
Last Post: YouHoGeon
  Get an average of the unique values of a column with group by condition and assign it klllmmm 0 581 Feb-17-2024, 05:53 PM
Last Post: klllmmm
  Converting column of values into muliple columns of counts highland44 0 394 Feb-01-2024, 12:48 AM
Last Post: highland44
  How to copy work sheet data one workbook to other? sayyedkamran 2 840 Nov-03-2023, 09:10 AM
Last Post: Larz60+
  xlwings error when reading a workbook Mishal0488 1 1,298 Aug-01-2023, 02:05 AM
Last Post: deanhystad
  PowerBI: Using Python Regex to look for values in column MarcusR44 1 1,116 Oct-14-2022, 01:03 PM
Last Post: ibreeden
  How to combine multiple column values into 1? cubangt 15 3,439 Aug-11-2022, 08:25 PM
Last Post: cubangt
  Help in opening and editing an excel workbook from a web-browser test 4 1,612 Aug-10-2022, 02:31 PM
Last Post: test
  Copy a column from one dataframe to another dataframe Led_Zeppelin 17 12,690 Jul-08-2022, 08:40 PM
Last Post: deanhystad
  Creating a numpy array from specific values of a spreadsheet column JulianZ 0 1,281 Apr-19-2022, 07:36 AM
Last Post: JulianZ

Forum Jump:

User Panel Messages

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