Using Python (and DataNitro) to copy cells from a specific worksheet in one Excel workbook to a specific worksheet in another Excel workbook

I do a lot of data analysis in Excel and studied Python and DataNitro to optimize my workflow. I specifically try to copy certain cells from one sheet into one Excel workbook and paste them into certain cells on a specific sheet in another Excel workbook. I save ("copying") using CellRange (DataNitro), but am not sure how to copy the saved content to a specific sheet, into another Excel workbook. Any question how can I do this? In addition, is it possible to make the range defined for CellRange conditional for certain properties of the cell?

I would really appreciate any help! Thank you all.

+4
source share
1 answer

Here's an example copy:

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

You can make a range conditional using regular Python logic ( ifetc.).

0
source

All Articles