0

I need to take values form one sheet in one Excel workbook and insert them into another existing workbook.

The values I need to take are the first 6 columns of the first file:

enter image description here

And I want to insert them at the beginning of another book like so enter image description here

I've been using Spire.Xls to read values from the first sheet and I thought I could just do the same; parse the worksheet, read the values and just paste them into the other sheet, but that wouldn't work because three of the columns I want to copy have the same header "Descripcion" so my parser would only take the values form the first descripcion column and skip the other ones.

Is there any way, using Excel.Interop or maybe Spire itself to copy and paste entire columns between workbooks? Or alternately, is there any way to get all of the 3 "descripcion" values (without rewriting the title of the columns)?

ConnorU
  • 1,379
  • 2
  • 15
  • 27
  • Another library to try out is EPPlus. Check them out on CodePlex. I haven't used Spire before, but EPPlus is very easy to use and work with. – krillgar Nov 25 '13 at 17:48

1 Answers1

0

VSTO might be helpful. I've done similar tasks in C#/VSTO.

Perhaps read through: Simple Example of VSTO Excel using a worksheet as a datasource

Community
  • 1
  • 1
David J Barnes
  • 506
  • 9
  • 15