We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Chart export as image

Hi,


I have a chart in an excel file. I want to read this chart as image in my .Net application and then save this image on the drive. Can you help in this regard?

Thanks

Hi,


Please see the document:
Convert an Excel Chart to Image

Thank you.

Hi,

Thanks for your posting and considering Aspose.Cells.

Please download and use the latest version:
Aspose.Cells for .NET (Latest Version)


Please see the code below how to take your chart image.

C#


string filePath = @“D:\source.xlsx”;


Workbook workbook = new Workbook(filePath);


//Assume your chart is in first worksheet and it is the first chart

Chart yourChart = workbook.Worksheets[0].Charts[0];


Bitmap yourChartImg = yourChart.ToImage();


yourChartImg.Save(filePath + “.out.jpg”, ImageFormat.Jpeg);



Ok thanks… Can you tell me one more thing. I have added GridWeb to view an existing excel file. It opens the file, displays its first sheet, but I cant scroll a sheet, or view 2nd or 3rd sheet of the opened excel file. Can you help in this regard?

Hi,


We recommend you to kindly install latest Aspose.Cells for .NET using its MSI installer:
Aspose.Cells for .NET (Latest Version)

When you install, it will install the latest Aspose.Cells.GridWeb control v2.7.4.xxxx on the machine, now add GridWeb control and add reference to your project and use it, it should work fine.

If you still find any issue, kindly do post your template Excel file here, we will check it soon.

Thank you.

I am using the attached excel file that I have generated using Aspose.cells api. I am using latest msi installer and the GridWebControl verison is
v2.7.4.xxxx. I am using the following line of code for importing an excel file:


GridWeb1.WebWorksheets.ImportExcelFile(System.AppDomain.CurrentDomain.BaseDirectory + “Temp.xls”);

Thanks

Hi,

It works absolutely fine loading your file into GridWeb and then navigating to other cells and other worksheets, I find no problem. I am testing it on Google chrome, IE8/9, FireFox, it works fine.

Please see the screen shot attached.

Moreover, I think you may add the following settings in your web.config file explicitly in your project.
It should work fine. By the way, by default if you have installed the Aspose.Cells for .NET msi, it works fine automatically.







Thank you.


Thanks Amjad for your reply.


I tried it again but in vain. One thing I must mention is that when I add the WebGrid to the aspx page, it is not resizable. and later on when I run it opening the file, it doesn’t display the SAVE button, and other buttons at the bottom of the sheet, nor can I browse sheets, or click on cells. Can you share your solution so that I check the differnce? I am using VS 2008.

Thanks
Hi,

Could you try to add my suggested config settings to the web.config file in your project:
....................................

And, make sure the client files (images, scripts etc.) are correctly installed at the URL path "/acw_client/". Also, please set the licensing code properly as the config settings are applicable in Licensed version.

By the way, could you create a separate sample project, zip it and post it here to show the issue

Thank you.

Its good idea to share this sample project with you. I have attached it herewith.

Its working now…


Thanks

Hello,


I am loading an excel file in Webgrid. This excel file has 2 sheets i.e Sales Pipeline and Closed Sales By Employee. The lateral sheet uses the values from prior one and has a formula like:

"SUMIFS(‘Sales Pipeline’!$J$4:$J$9,‘Sales Pipeline’!$C$4:$C$9,‘Closed Sales By Employee’!B$1,‘Sales Pipeline’!$K$4:$K$9,“Closed”,‘Sales Pipeline’!$G$4:$G$9,$A5)"

but in the WebGrid, when I view the Closed Sales By Employee Sheet, it contains “#Name” in all places where there was formula. Can you help in this regard?






Hi,


Please load your template file here, we will check your issue soon.

Thank you.

Regarding the earlier issue, it was solved as you guided.


I have attached the template file.

Thanks

Hi,


I can see the issue as you have mentioned by importing your attached template file to GridWeb. I have logged a ticket with an id: CELLSNET-40531. We will look into it soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-40531) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.