Getting error message when trying to instantiate Aspose.Cells

I'm trying out the demo to see how well it works and I got this issue.

I'm trying to instantiate a new instance of Aspose.Cells in VB.NET

Dim cell As Cells = New Cells

Error 35 'Aspose.Cells.Cells.Friend Sub New(Param As ’’., Param As Aspose.Cells.Worksheet)' is not accessible in this context because it is 'Friend'.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and use the latest version:
Aspose.Cells
for .NET v7.2.0.3

it will resolve your problem.

Please download and try the latest offline demos. These demos can work with Visual Studio 2005, 2008 or 2010. Please read the readme.txt file before running the demos.


Hi,

For your issue:
"Dim cell As Cells = New Cells.... Error 35 'Aspose.Cells.Cells.Friend Sub New(Param As ’’., Param As Aspose.Cells.Worksheet)' is not accessible in this context because it is 'Friend'."
This is not the right way that you could get Cells or Cell in a worksheet of the Workbook/Excel file. Therefore, you are getting this error. You must correct your codes accordingly. See the following sample code for your reference.

Sample code:

'Instantiating a Workbook object
Dim workbook As Workbook = New Workbook()

'Adding a new blank worksheet to the Excel object
Dim i As Integer = workbook.Worksheets.Add()

'Obtaining the reference of the newly added worksheet by passing its sheet index
Dim worksheet As Worksheet = workbook.Worksheets(i)


'Accessing cells
Dim cells As Cells = worksheet.Cells

‘Accessing cells using its name
Dim cell As Cell = cells(“A1”)

’…Your code goes here.

We recommend you to kindly check the Documentation especially the topics in the section e.g
http://www.aspose.com/docs/display/cellsnet/Working+with+Data



Thank you.
Amjad Sahi:
Hi,

For your issue:
"Dim cell As Cells = New Cells.... Error 35 'Aspose.Cells.Cells.Friend Sub New(Param As ’’., Param As Aspose.Cells.Worksheet)' is not accessible in this context because it is 'Friend'."
This is not the right way that you could get Cells or Cell in a worksheet of the Workbook/Excel file. Therefore, you are getting this error. You must correct your codes accordingly. See the following sample code for your reference.

Sample code:

'Instantiating a Workbook object
Dim workbook As Workbook = New Workbook()

'Adding a new blank worksheet to the Excel object
Dim i As Integer = workbook.Worksheets.Add()

'Obtaining the reference of the newly added worksheet by passing its sheet index
Dim worksheet As Worksheet = workbook.Worksheets(i)

'Accessing cells
Dim cells As Cells = worksheet.Cells


'Accessing cells using its name
Dim cell As Cell = cells("A1")

'...Your code goes here.

We recommend you to kindly check the Documentation especially the topics in the section e.g


Thank you.

Thanks for your reply. I have an issue that I posted a few months ago: <A href="</A></P> <P>and now decided to see how much time and effort to refactor from an old version of aspose.excel to aspose.cells now since the old version of apose.excel requires FIPS enable.<FONT color=#008000 size=2 face=Consolas><FONT color=#008000 size=2 face=Consolas><FONT color=#008000 size=2 face=Consolas></P></FONT></FONT></FONT>

Hi,


Yes, you need to do an effort to upgrade to latest versions of the product from your older version (Aspose.Excel), see a relevant topic: http://www.aspose.com/docs/display/cellsnet/Upgrade+to+Modern+Aspose.Cells+Component

For your information, with the release of Aspose.Cells for .NET version v5.0.0, we re-organized the API classes for Aspose.Cells component. This change has some major aspects that we follow. We have added new namespaces. All the API (classes, interfaces, enumerations, structures etc.) were previously located in the Aspose.Cells namespace. Now, certain sets of API have been moved to their relative namespaces, which make the relationship of classes (with their members) and namespaces clear and simplified.

Namespaces
All classes in Aspose.Cells are split into appropriate namespaces for easy access. The Aspose.Cells namespace is of course the root namespace that provides classes for generating, converting, modifying, rendering and printing Microsoft Excel documents without utilizing Microsoft Excel.

Namespaces in Aspose.Cells for .NET
e.g
Aspose.Cells
Aspose.Cells.Charts
Aspose.Cells.Drawing
Aspose.Cells.Rendering
Aspose.Cells.Rendering.PdfSecurity
Aspose.Cells.Pivot
Aspose.Cells.Tables
Aspose.Cells.Properties
Aspose.Cells.Markup
Aspose.Cells.DigitalSignatures
etc.

Please check the Programmer’s Guide:

See the API Reference Pages:


In short, you need to update your code a bit in accordance with latest API model of Aspose.Cells.

Please use latest version (v7.2.0) and let us know if you still find the issue.


Thank you.

Thanks Amjad, I appreciate your reply.

Hi,


Thanks for your posting.

Please feel free to contact us any time if you need further help or have more queries, we will be happy to assist you.