Evaluating Aspose.Cells

Hello

I am looking for a component to import/export Excel data so I downloaded and I have been trying Aspose.Cells (AC). This will replace my Office Automation (OA) code.

Could you please help me with the following issues :

1.In OA I can fill a cell with some color by setting the Excel.Range.Interior.Color property. How can I do that in AC? I tried setting the Background/ForeGround color of a cell's style but I cannot make it work. Further is it possible to fill a cell with a pattern?

2.In OA there is a property worksheet.StandardWidth. Is there something similar in AC?

3.I build a .Net DLL which will be used in a Delphi application as well as in a ,Net one. Do you know of any problems calling AC from a Delphi app?

4.Is Excel 2010 supported?

Thank you

Yannis

Hi Yannis,

Thank you for considering Aspose products.

Following are the answers of your questions:

Question #1: Fill a cell with color

//Instantiating a Workbook object
Workbook workbook = new Workbook();

// Add sky blue color to the palette.
workbook.ChangePalette(System.Drawing.Color.SkyBlue, 55);

//Obtaining the first worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[0];

//Now setting the foreground color of the "A1" cell to sky blue
worksheet.Cells["A1"].Style.ForegroundColor = Color.SkyBlue;

//Setting the background pattern of the "A1" cell to solid
worksheet.Cells["A1"].Style.Pattern = BackgroundType.Solid;

//Saving the Excel file
workbook.Save("C:\\cellBGtest.xlsx", SaveFormat.Excel97To2003);
workbook.Save("C:\\cellBGtest.xlsx", SaveFormat.Xlsx);


Question #2: Property for Width

//Accessing the worksheet of the Grid that is currently active
Worksheet sheet = gridDesktop1.GetActiveWorksheet();

//Accessing the first column of the worksheet
GridColumn column = sheet.Columns[0];

//Setting the width of the column
column.Width = 100;

GridRow row = sheet.Rows[0];

//Setting the height of the row
row.Height = 100;

Also:
worksheet.AutoFitRow(rowIndex);
worksheet.AutoFitColumn(colimnIndex);

Question #3: Aspose.Cells used in Delphi Application

It should work. However, if you encounter any issue, you may post the inquiry on the forum. We will answer the query.

Question #4: Excel 2010

Sure the new version does support Excel 2010. Generally MS Excel 2010 has similar formats as MS Excel 2007 with some extra enhancements for some features, also it has some new features that MS Excel 2007 does not provide, e.g sparklines etc.. so, our products does support MS Excel 2010. If any specific feature for Excel 2010 is not supported yet, we will include it on your request.

Thanks,

Hi,

2) If you are using Aspose.Cells library, you may check the following sample code for reference:
Workbook workbook = new Workbook();
Cells cells = workbook.Worksheets[0].Cells;
//Set the standardwidth of cell
cells.StandardWidth = 9;
//Set the standardheight of cell
cells.StandardHeight = 20;

workbook.Save(“e:\test\2outstandardwidhtheight.xls”);


Also, please check Aspose.Cells for .NET documentations for your reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/index.html

Thank you.