4

I do a lot of data analysis in Excel and have been exploring Python and DataNitro to streamline my workflow. I specifically am trying to copy certain cells from one sheet in one Excel workbook, and paste them into certain cells in a certain sheet in another Excel workbook. I have been storing ("copying") using CellRange (DataNitro), but am not sure how to copy the stored contents into a particular sheet, in another Excel workbook. Any clue how I may go about this? Also, is it possible to make the range defined for a CellRange conditional on certain cell properties?

I would really appreciate any help! Thank you, all.

1 Answers1

0

Here's an example of copying:

data = CellRange("A1:A10").value
active_wkbk("Book2.xlsx")
CellRange("A1:A10").value = data

You can make the range conditional using regular Python logic (if statements, etc.).

Ben Lerner
  • 1,318
  • 9
  • 12