Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Copy Data from Excel and Write to New Excel with CFSPREADSHEET

Posted on 2012-09-07
3
Medium Priority
?
681 Views
Last Modified: 2012-09-07
We are using CFSPREADSHEET to read data from an outputted excel spreadsheet and then we want to create a new single worksheet spreadsheet based on the query from the old one (Which has 10 worksheets that we don't want to share with the user).

Reading isn't a big deal:

<cfspreadsheet action="read" src="cells\tool.xlsx" sheetname="Export" rows="1-80" columns="1-55" query="Output">

But is there a simple/quick way to do the write part of this?    We were looping through the output but that seems to take forever.
0
Comment
Question by:digitalwise
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 2000 total points
ID: 38378179
Maybe I'm missing something, but if the data is already in a query - can't you just do action=write, like:

<cfspreadsheet action="write"
            filename="c:/path/to/newFileName.xls"
            query="yourQuery"
            sheetname="UserSheet"
            overwrite=true>
0
 

Author Closing Comment

by:digitalwise
ID: 38378223
Thank you.   So many complicated solutions - forgetting that there was an easy one.   Geez!!  Thanks.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 38378263
Yeah, sometimes all we need is a second set of eyes :)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Integration Management Part 2
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question