Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Copy & Paste Excel cells with data and color

$
0
0

I need to copy & paste Excel cells with data and fill color. The following PS will copy and paste A1 (green) and B1 (red) from Sheet1 to Sheet2. After running, the data is copied over and  the fill color of B1 on Sheet2 is red but the fill color of A1 is white, not green. Anything wrong? Thanks.

$range1 = $sheet1.range('A1:B1')
$range2 = $sheet2.range("A1")
$range1.copy()
$sheet2.paste($range2) 


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>