mardi 24 février 2015

Interop excel doesn't copy charts using vb.net on windows8

I'm building a program that makes excel based reports using xlsx files using the Microsoft.Office.Interop.Excel library and Visual Studio 2010.


I have a xlsx file with 2 charts, and some styles. Using...



Dim LibroExcel As Excel.Workbook
Dim HojaExcel() As Excel.Worksheet

LibroExcel.Worksheets(1).copy(After:=LibroExcel.Worksheets(i))

HojaExcel(i) = LibroExcel.Worksheets.Item(i + 1)


... I copy that sheet to another sheet until the for instruction I use ends.


The problem: In a system with Windows8 when I use this function, the charts are not copied from one sheet to the next one. But if I do the same on a Windows 7 system, it works. Both systems are using the same version of Excel.


Aucun commentaire:

Enregistrer un commentaire