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

Insert JPG into Excel

New Here ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

I'm using MX7 and I create a JPG file using cfchart but I need to insert that JPG into excel with ColdFusion - how do I do it?

Cfchart is working and I'm saving the file to a location without a problem but can't figure out how to insert it into excel.

TOPICS
Advanced techniques

Views

1.2K

Translate

Translate

Report

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
Guide ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

MX7 doesn't have any direct support for Excel documents, you'd have to check the documentation for the Excel COM objects and see if there's any way of doing it through there.

If there is, you can use createObject("com") and try to interact that way, might be a bit painful mind.

O.

Votes

Translate

Translate

Report

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
LEGEND ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

If there is, you can use createObject("com") and try to interact that way, might be a bit painful mind.

You must really hate EndoplasmicReticulum to be suggesting that

😉

Nah, I only say that because I had to try to do something like this once and calling Excel via COM in a production environment... really doesn't work very well.  Excel is a desktop app, and doesn't work well being used as a server-side app.

One could look to see if POI handles that sort of thing?

If not, from Excel save a sample of the end result as XML, and unpick the XML to work out what one has to do to recreate such a file dynamically, and then... do that.

--

Adam

Votes

Translate

Translate

Report

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
Guide ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

You must really hate EndoplasmicReticulum to be suggesting that

Oh I do, saw something about a rectum endoscopy and instantly went off the guy.

Incidentally, why are you trying to process data, create a chart and then import it into a data processing and charting package?

Votes

Translate

Translate

Report

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
New Here ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

Thanks for the help.

Well, I'm already pumping the output of a query into an excel speadsheet for my customers and now they want a bar chart of averages of the data to show below the reported data in Excel.

Votes

Translate

Translate

Report

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
Guide ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

It sounds like perhaps a rethink is in order.

If you wish to create them a nice report with tables and charts, use CFDOCUMENT to create them a PDF. If they want an Excel document with data they can manipulate, use Excel.

Votes

Translate

Translate

Report

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
Enthusiast ,
Apr 25, 2011 Apr 25, 2011

Copy link to clipboard

Copied

LATEST

There is a tag called CFX_EXCEL that you should look into.  It predates the built-in support in CF for

Excel interfacing, but uses the same POI library.  It supports the use of Excel tempalte files, which allows you to build a spreadsheet  or workbook in Excel, and then use the CF_EXCEL tag to put data into it.  You can build the graphs, etc., in the Excel doc to reference a specific block of cells for their data, and then populate those cells from the CF_EXCEL tag.  maybe put those cells into their own sheet.

-reed

Votes

Translate

Translate

Report

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
Documentation