[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ASP to XLS with input text included.

Posted on 2007-10-17
4
Medium Priority
?
290 Views
Last Modified: 2012-06-27
I've got an ASP page I created in Dreamweaver CS3 that pulls data from an SQLAnywhere database - The page has one table row of data such as account#, patient, status code, balance, etc.based on an SQL query.  

I put Dreamweavers "Repeat Region" behavior on that table to return all the matching accounts. So, once opened in the browser I may have 20 rows of data. In addition to the queried data, I've got 4 empty columns labeled New Bal, New Stat, Notes, etc.

I've already figured out how to create a "download" link that (when clicked) prompts the users to save the ASP page as an Excel doc called "save.xls" using the R e s p o n s e. C o n t e n t T y p e = tag on the linked page. So, the user can open the page, download it as an Excel doc, open the Excel doc and update those 4 extra columns. Cool.

But, I'd like to take this a step further, and on the ASP page put input boxes in the last 4 "update" fields, so the user can type in the new balance, status, etc. for all the accounts listed within the browser, click the download link, and save the Excel document with not only the queried info, but likewise the updated info they typed in for each account while in the web browser.

I've added the input fields, and figured out how to pass the data to my linked (Excel) page. However, likely due to the Repeat Region behavior I'm using, all the user updated field data ends up in each row of my Excel doc.

Meaning....If (from the browser) the user adds a new bal of 500 in row one, and 300 in row two, and 600 in row three, clicks the "download" link, saves the Excel doc, when I open the Excel doc, row ones balance field will have 500,300,600, as will rows two and three.

Please advise.
0
Comment
Question by:Rootwitch
  • 2
3 Comments
 
LVL 5

Expert Comment

by:ebertk
ID: 20097365
One problem with this approach might be that whenever you save a page to a file, it retrieves the page either from the server or the Browser's cache.  Anything entered on the page would be lost.  You could go about it by allowing someone to enter their new numbers, hit a button to update the changes to the page (this would need to launch an asp page to handle the update) then they could use your existing link to save the page as an XLS file.
0
 

Author Comment

by:Rootwitch
ID: 20104445
>>You could go about it by allowing someone to enter their new numbers, hit a button to update the changes to the page (this would need to launch an asp page to handle the update) then they could use your existing link to save the page as an XLS file.

I just tried that - Same problem - If (from the browser) the user adds a new bal of 500 in row one, and 300 in row two, and 600 in row three, and clicks the "Next" but, which takes them to an ASP handler page, which now has the input data, before downloading it, row ones balance field will have 500,300,600, as will rows two and three.
0
 
LVL 5

Accepted Solution

by:
ebertk earned 2000 total points
ID: 20104648
Seems like your handler page isn't processing the user entered results correctly.  Make sure the ASP page handles these inputs so that they displayed as normal text, not inside an input field on the page where they can get the XLS version of the data.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

830 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