0

Right now, FusionCharts 3.1 Flash charts provide a context menu that, if you configure it appropriately, will allow the user to save the data as a JPG / PNG / PDF file. The same menu also allows CSV data to be copied to clipboard.

Excel 2010 does not handle pasted CSV as one might wish here: it pastes into one line per cell without separating on commas. You can, with a song and dance, have the CSV interpreted: click on Data, then Text to Columns, then Delimited and Next, then uncheck Tab and check Comma as separator, and then Finish (English translation: "Please call our help desk!"). This is really a few steps too many for usability concerns.

One could imagine a slightly shorter song and dance (perhaps open up Notepad, paste, and save with a .csv extension), but I would ideally like people to run on a mental model of "I save the data, open it with Excel, and see the data naturally."

Is there a way to let FusionCharts export CSV as text/csv so there is no song and dance required of the end user beyond "Save the data and open it in Excel"?

Christos Hayward
  • 5,777
  • 17
  • 58
  • 113

2 Answers2

4

Could you please try once setting exportDataSeparator='{tab}' in <chart> and try again? My Excel in mac seems to respond well using this.

I have used this XML and right clicked on chart to copy data to clip-board and pasted in excel:

<chart exportDataSeparator='{tab}' showExportDataMenuItem='1'caption='Weekly Sales Summary'  xAxisName='Week' yAxisName='Sales' numberPrefix='$' >
    <categories>
        <category label='Dec'/>
        <category label='Jan'/>
        <category label='Feb'/>
        <category label='Mar'/>
        <category label='Apr'/>
        <category label='May'/>

    </categories>

    <dataset seriesName='current'>
        <set value='123123' />
        <set value='123123' />
        <set value='123123' />
        <set value='123123' />
        <set value='123123' />
        <set value='123123' />
    </dataset>
    <dataset seriesName='2010'>
        <set value='123123' />
        <set value='123123' />
        <set value='123123' />
        <set value='123123' />
        <set value='123123' />
        <set value='123123' />
    </dataset>
</chart>

My excel in mac shows this: Excel-mac puts csv values in proper cells when separator is set to tab

And so is my windows Excel 2010:

In Excel 2010 Windws it works too

sudipto
  • 2,472
  • 1
  • 17
  • 21
2

Not natively, but you can use the javascript API to copy it to a Javascript variable (see http://www.fusioncharts.com/docs/ExportDataJS.html) and then use Downloadify or HTML5 data uris to generate a save file dialog (as covered here Using HTML5/Javascript to generate and save a file).

Let me know if that works: kinda interesting, didn't realize this was running around.

Community
  • 1
  • 1
Femi
  • 64,273
  • 8
  • 118
  • 148
  • Has the http://downloadify.info Downloadify domain been purchased/transferred, and if so is there a new location? The present site seems completely unrelated to the answer given. – Christos Hayward May 27 '11 at 15:02
  • I guess it has: the last post is from 2010, so it seems it probably lapsed and then got scooped up by a squatter. Try https://github.com/dcneiner/downloadify – Femi May 27 '11 at 15:20
  • Aah... let us know if this succeeds and possibly share a demo. :) – Shamasis Bhattacharya Jun 03 '11 at 08:33