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

CFCONTENT Excel---Save Formulas

Participant ,
Feb 16, 2011 Feb 16, 2011

I am using <cfcontent type="application/vnd.ms-excel"> tag.

It works well as it output the values to an excel spreadsheet.

My question is instead of outputting just the values can I output the values with the formulas that were used to calculate the values.

I need my users to be able to modify values in the spreadsheet and have it calcualte without them having to add the formulas themselves.

953
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
LEGEND ,
Feb 16, 2011 Feb 16, 2011

I am using <cfcontent type="application/vnd.ms-excel"> tag.

It works well as it output the values to an excel spreadsheet.

All CFCONTENT does is to set the MIME type of the HTTP resonse which gets sent back tot he browser.  It doesn't in any way make the text that you stream down to the browser into an XLS file: it's still just text.  All it means is the browser - if configured to understand what "application/vnd.ms-excel" means - might suggest to the user that the returned data could be opened by Excel, rather than rendering it in the browser window.  And if Excel can interpret the returned text in a way that it can convert it to its own format... it will.

However instead of horsing around with CFCONTENT and sending text to Excel... can't you use CFSPREADSHEET to create an actual XLS file?

--

Adam

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
Community Expert ,
Feb 16, 2011 Feb 16, 2011
LATEST

This wouldn't have anything to do with CF, really - if CSV supports formulas, you can put them in:

http://www.mrexcel.com/forum/showthread.php?t=23274

That said, I'd second Adam's recommendation to just use CFSPREADSHEET if that's an option.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Dave Watts, Eidolon LLC
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