Warren,
It is still not working by using the new dll. All the code are from the sample code.
protected void btnChart2Image_Click(object sender, EventArgs e)
{
try
{
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense("Aspose.Cells.lic");
//Instantiating an Workbook object
Workbook workbook = new Workbook();
//Adding a new worksheet to the Excel object
int sheetIndex = workbook.Worksheets.Add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[sheetIndex];
//Adding a sample value to "A1" cell
worksheet.Cells["A1"].PutValue(50);
//Adding a sample value to "A2" cell
worksheet.Cells["A2"].PutValue(100);
//Adding a sample value to "A3" cell
worksheet.Cells["A3"].PutValue(150);
//Adding a sample value to "B1" cell
worksheet.Cells["B1"].PutValue(4);
//Adding a sample value to "B2" cell
worksheet.Cells["B2"].PutValue(20);
//Adding a sample value to "B3" cell
worksheet.Cells["B3"].PutValue(50);
//Adding a chart to the worksheet
int chartIndex = worksheet.Charts.Add(ChartType.Pyramid, 5, 0, 15, 5);
//Accessing the instance of the newly added chart
Chart chart = worksheet.Charts[chartIndex];
//Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3"
chart.NSeries.Add("A1:B3", true);
//Converting chart to image.
Bitmap bitmap = chart.ToImage(); // return null
//Saving the chart image.
//bitmap.Save("c:\\Chart.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
//Saving the Excel file
workbook.Save("C:\\SampleChart.xls");
}
catch (Exception err)
{
lblError.Text = "btnBasicPivotTable_Click -- " + err.Message;
lblError.Visible = true;
btnFind.Visible = false;
}
}