Support of Excel 2010 and sparklines

Hi,

will Aspose.Cells support Excel 2010 and sparklines in near future?

Regards

Ranko

Hi,

Thank you for considering Aspose.

We will get back to you regarding your inquiry.

Thank You & Best Regards,

We will start to work on Excel2010 in the next week. Hopefully we can make it in the first half of 2010.

Hi,

Please try the attached version/fix. We have supported to keep Excel 2010 features such as sparklines and slicer’s data in xlsx file.

Thank you

Thanks Amjad

any chance you could provide me with an example?

Hi,

Well, currently we only support to keep the data in xlsx file. In the previous versions if an xlsx file contains sparklines, the data of sparklines gets lost when opening/saving the file. But with the latest version , the sparklines data will not be lost.


Thank you.

What about functionality to create new or modify existing Excel 2010 sparklines? Will this feature be supported and do you have an approx. date when?

Hi,

Thank you for considering Aspose.

Well, I am afraid creation and modification of Excel 2010 sparklines is not supported at the moment. We have registered your requested feature in our internal issue tracking system with issue id CELLSNET-14136. We will look into the feasibility of your requested feature and get back to you soon.

Thank You & Best Regards,

Hi,

Please try the attached latest version of Aspose.Cells. We have supported Excel 2010 Sparkline feature.

Kindly consult the following code:

using Aspose.Cells;

using Aspose.Cells.Excel2010;


Workbook book = new Workbook();

book.Open(path + "src.xlsx");

Worksheet sheet = book.Worksheets[0];

// read the Sparklines from file

foreach(SparklineGroup g in sheet.SparklineGroupCollection)

{

Console.WriteLine("sparkline group: type:" + g.Type + ", sparkline items count:" + g.SparklineCollection.Count);

foreach (Sparkline s in g.SparklineCollection)

{

Console.WriteLine("sparkline: row:" + s.Row + ", col:" + s.Column + ", dataRange:"+ s.DataRange);

}

}

// add Sparklines

CellArea ca = new CellArea();

ca.StartColumn = 3;

ca.EndColumn = 3;

ca.StartRow = 7;

ca.EndRow = 9;

int idx = sheet.SparklineGroupCollection.Add(SparklineType.Column, "Sheet1!A8:B10", false, ca);

SparklineGroup group = sheet.SparklineGroupCollection[idx];

group.SeriesColor = CreateCellColor(book, Color.Orange);

book.Save(path + "out.xlsx");

Thank You & Best Regards,

Thanks!

What happends in method CreateCellColor() ???

If I run your sample there are no Sparklines shown in the sheet. Could you include data into your sample?

FYI: I am using Excel 2010 Beta

...or please tell me what is wrong with this samle

Workbook wb = new Workbook();

wb.Worksheets.Clear();

Worksheet ws = wb.Worksheets.Add("New");

ws.Cells["A8"].PutValue(34);

ws.Cells["A9"].PutValue(50);

ws.Cells["A10"].PutValue(34);

CellArea ca = new CellArea();

ca.StartColumn = 0;

ca.EndColumn = 0;

ca.StartRow = 0;

ca.EndRow = 0;

int idx = ws.SparklineGroupCollection.Add(SparklineType.Column, ws.Name + "!A8:A10", true, ca);

SparklineGroup group = ws.SparklineGroupCollection[idx];

wb.Save(@"Result.xlsx");

Hi,

Please change your code to:

Workbook wb = new Workbook(FileFormatType.Excel2007Xlsx); // specify the dest file type

wb.Worksheets.Clear();

Worksheet ws = wb.Worksheets.Add("New");

ws.Cells["A8"].PutValue(34);

ws.Cells["A9"].PutValue(50);

ws.Cells["A10"].PutValue(34);

CellArea ca = new CellArea();

ca.StartColumn = 0;

ca.EndColumn = 0;

ca.StartRow = 0;

ca.EndRow = 0;

int idx = ws.SparklineGroupCollection.Add(SparklineType.Column, ws.Name + "!A8:A10", true, ca);

SparklineGroup group = ws.SparklineGroupCollection[idx];

// change the color of the series if need

CellsColor clr = wb.CreateCellsColor();

clr.Color = Color.Orange;

group.SeriesColor = clr;

wb.Save(@"Result.xlsx");

Thank You & Best Regards,