Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Query to Existing Excel file

Status
Not open for further replies.

Demon148

Technical User
Jan 16, 2003
11
0
0
US
Hello everyone and thank you in advance for taking the time to help.
OBJECTIVE:
I have an Existing Excel (Requests.xls) file that has several worksheets containing pivot tables and graphs.
within this file a worksheet (data) supplies the range of values for the other worksheets.
I want to store the Excel file on the Server so all the user has to do is click a link (opens Requests_excel.cfm - see code) to download the excel file onto their computer.

Can someone point me in the right direction to take my query and export it into the existing worksheet (data) in the Requests.xls file so when the user opens the Document they have all of the current information to view the pivot tables and graphs.

I had success creating a new Excel file that exports the query data in it using the following logic.

CODE: Requests_excel.cfm

<cfheader name="content-disposition" value="attachment;filename=Requests.xls">
<cfcontent type="application/msexcel">
<cfinclude template="Requests.cfm">

FYI: Requests.cfm
Contains my Query
and Displays the table with column headers and the dataoutput rows.

Thank you
Brad


 
I found a very basic solution to my objective.
I went into my excel worksheet and went to the Menu
Data -> Import External Data -> New Web Query
The Window then prompts you to Enter your url address (...Requests.cfm) and put a check mark next to the table you would like to select for Importing. Its probably not an ideal Solution for me but it is a start.

If someone has an better solution to my original question/objective i would still greatly appreciate an answer.

Thank you
Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top