I am trying to create function which can copy certain column from one workbook to another. However, I keep getting the following
error - The information cannot be pasted because the Copy area and the paste area are not the same size and shape.
on the code line below:
xlSourceRange.Copy(xlDestRange);
This is what I have so far.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
Excel.Workbook xlWorkBook;
Excel.Workbook xlWorkBook2;
Excel.Worksheet xlWorkSheet;
Excel.Worksheet xlWshe ...
Go to the complete details ...