Help on Conversion from MSExcel Interop to ASPOSE.EXCEL


#1

I have a class that encapsulate/wrapper the MSExcel Interop, and now I’m converting using the ASPOSE.EXCEL.

Could you give me the Enumeration for the following:

Excel.XlHAlign, Excel.XlVAlign, Excel.XlOrientation, Excel.Constants, Excel.XlLineStyle, Excel.XlBorderWeight, Excel.XlBordersIndex


Attached is the vb file of my ExcelWrapper. Could you give me a summary of the appropriate method, properties and enum to use in replacement of the the original that i used for MSExcel Interop.


#2

XlHAlign, XlVAlign - TextAlignmentType.

XlOrientation - Please check Style.Rotation.

XlLineStyle, XlBorderWeight - CellBorderType

XlBordersIndex - BorderType

In your code, Constants enumeration is used in color setting. Please check http://www.aspose.com/Products/Aspose.Excel/Api/Aspose.Excel.Excel.ChangePalette.html
for reference.



#3

Do you also have the equivalent of the following for ASPOSE.Excel?

ColumnWidth, RowHeight, Rows.EntireRow.AutoFit, Columns.AutoFit



#4

Yes. Please check:

ColumnWidth - Cells.GetColumnWidth, Cells.SetColumnWidth
RowHeight - Cells.GetRowHeight, Cells.SetRowHeight

Rows.EntireRow.AutoFit - Worksheet.AutoFitRow
Columns.EntireColumn.AutoFit - Worksheet.AutoFitColumn


#5

I would like first to thank you in advance for the immediate response back policy your group have.

Do you have an equivalent of the following?

Range(Rangename).Locked


#6

equivalent please:

Comments(i).Visible


#7

To lock a cell, please use Cell.Style.IsLocked property.

Comment.Visible property is not supported yet. We will add it in the future release.


#8

How do i get an Address of a range? ex “A1:Z100”


#9

In Aspose.Excel, you can access a range cell by cell. Or you can use Cells.CreateRange method to create a Range object.


#10

Is there a way to combine the CellBorderType for the Border.LineStyle class properties.

example. i would like to combine DashDot with Thick.


#11

No. MS Excel doesn’t support ThickDashDot. You can only use the border type specified in CellBorderType enumeration.


#12

Do you have a Demo code on how to use Add-In for the Enterprise version of ASPOSE.Excel.


#13

My sample code that has an error ( Invalid function format&nbspWink



Dim excel As Excel = New Excel

excel.Worksheets.Add(SheetType.Worksheet)

excel.Worksheets(excel.Worksheets.Count - 1).Name = “Hello World”

excel.Worksheets(“Hello World”).Cells(“C4”).SetAddInFormula(“SOLVER.XLA”, “GoalSeekGoal”)



Could you tell me that i’m doing wrong here?


#14

Please try this:

excel.Worksheets(“Hello World”).Cells(“C4”).SetAddInFormula(“SOLVER.XLA”, “=GoalSeekGoal()”)



Other sample code:

cells[“h11”].SetAddInFormula(“HRVSTTRK.xla”, “=pct_overcut(F3:G3)”);
cells[“h12”].SetAddInFormula(“HRVSTTRK.xla”, “=pct_overcut()”);