We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Tool needed

Hi,

I want to convert ms-excel file into Aspose.cell.excel
Because I am already using ms excel file in my code and I to use that one
only to generate charts.

Dim workbook As New Workbook()
workbook.Open("f:\test\ChartTest.xls")

Instead of this I want to use
workbook=cype(myexcelworkbook,aspose.cell.workbook) but through error
"
Unable to cast COM object of type 'Excel.WorkbookClass' to class type
'Aspose.Cells.Workbook'. Instances of types that represent COM components
cannot be cast to types that do not represent COM components; however they
can be cast to interfaces as long as...
"
If we go for ur first code that is
workbook.Open("f:\test\ChartTest.xls")

This is also throwing error that this file is already used by another
process,so cannot be opened.

Please help me.


This message was posted using Email2Forum by Amjad Sahi.

Hi Rajesh,

Well, I think you are using older Aspose.Excel component. For your info,
Aspose.Excel has been renamed to become Aspose.Cells now which is more
enhanced and feature rich component. Moreover, you cannot implement your
code like i.e.., workbook=cype(myexcelworkbook,aspose.cell.workbook)

Since manipulation of charts are not supported in the older versions. I
think you should upgrade to latest Aspose.Cells(4.6), please check the doc
that demonstrate how to upgrade to it:

http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/upgrade-to-modern-aspose-cells-component.html

And please make sure that while you open/load the file using Aspose.Cells
APIs, the file should not be opened or should not be an existing process
part.

Thank you.