I am trying to capture an image of a excel sheet within the OLE object in a Powerpoint slide using the code below :
Hi Mandy,
Thanks for your posting and using Aspose.Cells.
It seems to be a new feature. MS-Excel 2007 does not support it. We have logged a New Feature Request in our database to support this feature. We will look into it and implement it if possible. Once, there is some fix or update for you, we will let you know asap.
This issue has been logged as CELLSNET-42230.
C#
Workbook workbook = new Workbook(path);
Worksheet worksheet = workbook.Worksheets[0];
Aspose.Cells.Rendering.ImageOrPrintOptions options = new Aspose.Cells.Rendering.ImageOrPrintOptions();
options.OnePagePerSheet = true;
options.ImageFormat = ImageFormat.Png;
SheetRender sr = new SheetRender(worksheet, options);
sr.ToImage(0, path + “.out.png”);
Hi,
Thanks for using Aspose.Cells for .NET.
We have fixed this issue.
Please download and try this fix: Aspose.Cells for .NET v7.7.0.2 and let us know your feedback.
Hi,
Hi Mandy,
Thanks for your feedback and using Aspose.Cells.
Please add the following line of code to make it work correctly.
databar.NegativeBarFormat.ColorType = DataBarNegativeColorType.DataBarColor;
Here is the complete code. I have also attached the output xlsx file and the screenshot for your reference.
C#
Workbook Workbook = new Workbook();
int index = Workbook.Worksheets[0].ConditionalFormattings.Add();
FormatConditionCollection conditionalFormat = Workbook.Worksheets[0].ConditionalFormattings[index];
Range rng = Workbook.Worksheets[0].Cells.CreateRange(“A1:A10”);
CellArea ca = new CellArea()
{
StartRow = rng.FirstRow,
StartColumn = rng.FirstColumn,
EndRow = rng.FirstRow + rng.RowCount - 1,
EndColumn = rng.FirstColumn + rng.ColumnCount - 1
};
int idx = conditionalFormat.AddCondition(FormatConditionType.DataBar);
conditionalFormat.AddArea(ca);
FormatCondition cond = conditionalFormat[idx];
DataBar databar = cond.DataBar;
databar.NegativeBarFormat.Color = Color.Red;
databar.NegativeBarFormat.ColorType = DataBarNegativeColorType.DataBarColor;
databar.NegativeBarFormat.BorderColor = Color.Red;
databar.Color = Color.Green;
databar.ShowValue = true;
databar.BarBorder.Type = DataBarBorderType.DataBarBorderNone;
databar.BarFillType = DataBarFillType.DataBarFillSolid;
databar.AxisPosition = DataBarAxisPosition.DataBarAxisAutomatic;
databar.AxisColor = Color.Gray;
Workbook.Save(“output2.xlsx”);
Hi,
The issues you have found earlier (filed as CELLSNET-42230) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.