Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Feb 28, 2017 12:19 pm

Hi

I'm using the demo version in order to decide if to buy this product.
my version is : 7.0.35.7040

I have an Excel file with a chart,
trying to save it as image - in order to attache it to an html and sent it vie Email.

my code :
public Image[] saveImages(string fullName)
{

Workbook workbook = new Workbook();
workbook.LoadFromFile(fullName, ExcelVersion.Version2010);
Worksheet sheet = workbook.Worksheets[0];
Image[] imgs = workbook.SaveChartAsImage(sheet);
for (int i = 0; i < imgs.Length; i++)
{
imgs[i].Save(string.Format("img-{0}.png", i), System.Drawing.Imaging.ImageFormat.Png);
}
return imgs;
}
the method : SaveChartAsImage

is not recognize by C#
(error workbook does not contain a definition for ...)

if this feature is not working we will try (& buy) an excel library that does has this features
thanks

attached my excel file

yosisndr
 
Posts: 4
Joined: Sun May 31, 2015 7:27 am

Wed Mar 01, 2017 1:58 am

Dear yosisndr,

Thanks for your inquiry.
The version you were using is old version, please upgrade to the lastest Spire.XLS Pack Hotfix Version:7.11.59 which has the method SaveChartAsImage and have a try.
Sorry that I didn't find the attached file here. If there still is issue with the version, please upload the file again here, or send it to us(Support@e-iceblue.com) via email. We will do an investigation and then update to you.

BTW, you can contact our sales team(sales@e-iceblue.com) to get a temporary license file for one month to remove the warning message and have a better evaluation on our products.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Mar 01, 2017 7:12 am

Thanks ,

will try

yosisndr
 
Posts: 4
Joined: Sun May 31, 2015 7:27 am

Return to Spire.XLS