Sign in to follow this  
marala81

Regarding saving image to excel

Recommended Posts

hi,

 

i want to export chart image to excel or word or powerpoint. i am using updatepanels and displaying chart in the Panel using "InfoSoftGlobal.FusionCharts.RenderChartHTML()" method and "pnlPanel.Controls.Add(new LiteralControl(outPut));". when i use to download chart image using excel it is giving error as "Object deosn't support this method" error. when downloading using link i am getting above error. but when i use to save image by right clicking image it is exporting to excel.

 

 

 

i am using following method

 

 

 

function SaveFusionChart()

 

{

 

var chartToPrint = getChartFromId("dispChart1");

 

chartToPrint.saveAsImage(); /// here i am getting error

 

}

 

 

 

can you please help is there any other way when used RenderChartHTML() rather than "RenderChart()"

 

 

 

Thanks

 

Marala

Share this post


Link to post
Share on other sites

Hi,

 

 

 

If you are using old dll then please update it to our latest version.

 

Also please make sure that you are enabling RegisterWithJS property in RenderChartHTML() method.

Share this post


Link to post
Share on other sites

hi,

 

i have downloaded swf files added them into my project is it necessary to add DLL to project. if yes how could i download them and add into my project. can you please rectify my doubt.

 

and i am using following code

 

 

 

StringBuilder prepairedXml = null;

 

 

 

 

 

 

 

//prepairedXml = prepareXMLFortwoClients(dset);

 

 

 

 

 

 

 

if (dset.Tables[1].Rows.Count > 1)

 

 

 

{

 

 

 

prepairedXml = prepareXMLFortwoClients(dset); // To display two clients

 

 

 

}

 

 

 

 

 

 

 

 

 

 

 

string outPut = "";

 

 

 

 

 

 

 

outPut = InfoSoftGlobal.FusionCharts.RenderChartHTML("FusionCharts/DragNode.swf", "", prepairedXml.ToString(), "dispChart1", "700", "600", false);

 

 

 

//Clear panel which will contain the chart

 

 

 

pnlPanel.Controls.Clear();

 

 

 

 

 

 

 

//Add Litaral control to Panel which adds the chart from outPut string

 

 

 

pnlPanel.Controls.Add(new LiteralControl(outPut));

 

 

 

// prepairedXml.ToString() Contains xml format

 

 

 

Thanks

 

marala

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Could you please try using the following code?

 

 

 

StringBuilder prepairedXml = null;

 

 

 

 

 

 

 

//prepairedXml = prepareXMLFortwoClients(dset);

 

 

 

 

 

 

 

if (dset.Tables[1].Rows.Count > 1)

 

 

 

{

 

 

 

prepairedXml = prepareXMLFortwoClients(dset); // To display two clients

 

 

 

}

 

 

 

 

 

 

 

 

 

 

 

string outPut = "";

 

 

 

 

 

 

 

outPut = InfoSoftGlobal.FusionCharts.RenderChartHTML("FusionCharts/DragNode.swf", "", prepairedXml.ToString(), "dispChart1", "700", "600", false, true); //This will make registerWithJS enabled.

 

 

 

 

 

//Clear panel which will contain the chart

 

 

 

pnlPanel.Controls.Clear();

 

 

 

 

 

 

 

//Add Litaral control to Panel which adds the chart from outPut string

 

 

 

pnlPanel.Controls.Add(new LiteralControl(outPut));

 

 

 

// prepairedXml.ToString() Contains xml format

Share this post


Link to post
Share on other sites
Guest Rajroop

Hey there,

 

 

 

We've just released a new and free add-in for PowerPoint that lets you add FusionCharts very easily to your slides. Check out oomfo @ http://oomfo.com

 

 

 

Would love to have your feedback/suggestions. :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this