Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to use cfcontent to export cfchart image to Word?

New Here ,
Oct 08, 2009 Oct 08, 2009

I tried to use cfcontent to send cfchart image to Word 2003. It did not work.

Does any one have idea how to do that please?

The code I used is:

<cfquery name="DataTable" datasource="#Request.DSN#" >
  select *
  from   testchart 
</cfquery>

<cfchart format="jpg"
    xaxistitle="Department"
    yaxistitle="Number">

<cfchartseries type="line"
    query="DataTable"
    itemcolumn="Dept"
    valuecolumn="Number">

</cfchartseries>
</cfchart>

939
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 09, 2009 Oct 09, 2009
LATEST

Possible solutions:

1. You might try creating a rich text format (.rtf) file in ColdFusion.  The .rtf format is understood by Word and other applications like OpenOffice.org.
http://www.jensbits.com/2009/06/21/using-coldfusion-to-generate-a-word-document/


2. You could use a Java component to create a Word document.

Aspose.Words for Java (commercial Java component)
http://www.aspose.com/categories/java-components/aspose.words-for-java/default.aspx

Apache POI (open source Java component)
http://poi.apache.org/hwpf/index.html


3. You could create an XML document which is compatible with Word.
http://msdn.microsoft.com/en-us/library/aa223584%28office.11%29.aspx
http://msdn.microsoft.com/en-us/library/aa212812%28office.11%29.aspx


You will probably need to look into using the name attribute of CHART to get your chart image into a binary format what can be used programmatically.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources