Export data and graph to excel

Hi,

I need your help.

How can I when document ready to export the data with the graph to excel?

this is what I have

I want the output to be displayed in the excel document.

Thanks,
Lulu

	<style type="text/css">
		.highchart { display:none; }
		.container
		{
			width:500px;
			float:left;
			margin: 30px;
			padding:10px;
			background-color:#eee;
			-webkit-box-shadow: 0px 1px 15px rgba(50, 50, 50, 0.75);
			-moz-box-shadow:    0px 1px 15px rgba(50, 50, 50, 0.75);
			box-shadow:         0px 1px 15px rgba(50, 50, 50, 0.75);
		}
		#parent
		{
			margin-left:7%;
			margin-bottom:10%;
		}
	</style>
	
	<!---
		loading jQuery and jQuery UI javascript,
		with highchartTable plugin
	--->
	
	<script src="../Script/ChartInExcel/jquery.min.js" type="text/javascript"></script>
	<script src="../Script/ChartInExcel/jquery-ui.min.js" type="text/javascript"></script>
	<script src="../Script/ChartInExcel/highcharts.js" type="text/javascript"></script>
	<script src="../Script/ChartInExcel/jquery.highchartTable.js" type="text/javascript"></script>
	<script src="../Script/ChartInExcel/exporting.js" type="text/javascript"></script>
	
	<script type="text/javascript">
		/*
			jQuery document ready
			The HighchartsTable plugin takes data
			and attributes from a table
			and parses them to simply create an Hight-charts chart
		*/
		$(document).ready(function()
		{
			/*
				simply call highchartTable on a selector
				that selects the prepared table. Like this : 
			*/
			$('table.highchart').highchartTable();
		});
	</script>
</head>
<body>
	<h1 style="text-align:center;">How to create pure HTML5 chart using jQuery</h1>
	
	<!--
		chart generated and placed into below divs.
		which defined into tables data-graph-container attributes
	-->
	<div id="parent">
		<div class="highchart-container container"></div>
		<div class="highchart-container_first container"></div>
		<div class="highchart-container_second container"></div>
		<div style="clear:both;"></div>
	</div>
	
	<table class="highchart" data-graph-container=".highchart-container" data-graph-type="pie">
		<thead>
			<tr>
				<th>Month</th>
				<th>Sales</th>
				<th>Benefits</th>
			</tr>
		</thead>
		<tbody>
			<tr>
			  <td>January</td>
			  <td>8000</td>
			  <td>2000</td>
			</tr>
			<tr>
			  <td>February</td>
			  <td>12000</td>
			  <td>3000</td>
			</tr>
			<tr>
			  <td>March</td>
			  <td>18000</td>
			  <td>4000</td>
			</tr>
			<tr>
			  <td>April</td>
			  <td>2000</td>
			  <td>-1000</td>
			</tr>
			<tr>
			  <td>May</td>
			  <td>500</td>
			  <td>-2500</td>
			</tr>
		</tbody>
	</table>
	
	
	
	

Open in new window

lulu50Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
You can have Excel pull the data in from the same place the jquery gets it if it is dynamically loaded on the webpage and have Excel render the graph.

Or you can use the "From Web" under the "Data" tab to select the table on your webpage
0
lulu50Author Commented:
I've requested that this question be deleted for the following reason:

Incorrect answer.
0
RobOwner (Aidellio)Commented:
What was incorrect?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

lulu50Author Commented:
Rob,

"You can have Excel pull the data in from the same place the jquery gets it"
I don't know what you are talking about. You said I can do but how ? I need an either an example or show me what I am doing wrong.

"you can use the "From Web" under the "Data" tab to select the table on your webpage"
what From Web are you talking about that I can select the table.

I don't understand anything you said.  

Please provide either an example or look at my code.  

Thanks for trying to help but again I am not getting what you are saying unless I see some examples.
0
RobOwner (Aidellio)Commented:
The chart in your example is generated by javascript and it is not able to be directly converted to excel.  What you need to do is link Excel to the same underlying data that highcharts uses and have Excel create the graph.

In otherwords, in Excel:

Clipboard01.jpg
Clipboard02.jpg
Clipboard03.jpg
0
lulu50Author Commented:
I think you have missed understand me.
because you are showing me how to generate a graph in excel which something I did not ask for.

My question was how to do it in coldfusion, and your example does not provide me with a correct result.

I don't want to know how to generate a chart in excel, what i want is how to generate a coldfusion code that would export the data to excel and generate a report.

It is totally different thing.

Thank you for trying but that's not what I meant or what I want.
0
lulu50Author Commented:
I've requested that this question be deleted for the following reason:

I did not find a solution to my question
0
RobOwner (Aidellio)Commented:
My question was how to do it in coldfusion, and your example does not provide me with a correct result.
Where was coldfusion mentioned?  It's not even listed as one of the topics??

You are using highcharts, javascript plugin that generates the graph using vector graphics and redraws with each page refresh.  In otherwords it isn't an image.

To get it into Excel, you need to create the chart in Excel using the same data source from which highcharts was referencing.

To create an excel document with a chart using coldfusion is a completely different question to the one you've asked.

My comments answer your original question, which was about re-creating the chart in Excel.  Even if that isn't what you meant, that's the question that was asked.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lulu50Author Commented:
Rob,

Yes, I now agree with you.

It is my fault for not including the word Coldfusion.  I thought I did but looking at the question above I don't see the word Coldfusion.

It is not your fault that I did not get the correct answer.

so, I will give you the credit for it.

You are a great fighter let me tell you. (You do not give up not bad)

You should be a lawyer or something you just don't give up.

It is a good thing, keep it up Rob lol lol lol

You win :-)

I just want to Thank you for all your help,

I do appriciate everyone that have helped millions of users here.

I Thank you again and again and next time I'll make sure to give more details to what I'm trying to accomplished.

Lulu
0
lulu50Author Commented:
Thanks,
0
RobOwner (Aidellio)Commented:
Thanks Lulu for all the kind words :)  

I do understand how frustrating it can be not getting the answers you need.

I hope that you can get an answer in Coldfusion soon!

Cheers,

Rob
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.