1.) I've done this using macros in excel but I can't get the macros to run with the security of the xls file. I can't change the security, how can I make that particular macro safe?
2.) Now that I have macros running in excel, i'd like to know how to implement them into my asp page. I can't just copy and paste my macro b/c it wouldn't know what file it's looking for. I need help putting a macro on my page pointing at any given xls (dynamically as they will change)
3.) When running the macro in excel, i have problems with the output. Currently (until i get a better grasp on getting it running) i am using a macro from MSDN called quotecommaexport (which obviously makes a comma separated list of the data from excel) and the problem is when the xls shows ########## instead of the value b/c of lack of space.
It works when I span out the column and shows the value, the correct value is exported. Otherwise, it exports "#############" which does nothing for me. How can i get it to export the value without me physically spanning out the columns to give the value room. (I know this question may not make sense) Code:
I am writing a web-based information portal and one of the requested features is that some data be outputted not to the screen, but to an MS Excel file.
I could not find much information on this topic, but I'm sure there's a way. All the database searching is in place, the recordset has been built, I just need an interface to send data into Excel as opposed to a text file, or to the screen. Code:
I am trying to pull data from a DB an export it to the user in a comma delimited text file.I found this.Do I need to save the actual textfile or is it possible to stream the text file out to the browser? If the answer is yes, how do I stream it after it is saved and delete it once it is saved by the user?
I have been able to successfully export data to Excel via ASP, however there is a small problem.When the file download window is displayed (to export to excel), you have have several options: open, save and cancel. Pressing the save button allows you to save a *.xls file to your HDD (THIS WORKS FINE). However, most users will push the open button. By doing so, the same screen will appear again with the same options: open, save and cancel. Pressing the open button again causes MS Excel to open (as expected) and then a dialog with the following message appears: "C:Documents and Settings<user name>Local SettingsTemporary Internet FilesContent.IE5BIOJDDG5<filename[1].xls> could not be found".
As most users will probably press the Open button, I want to find a solution to this problem.
I am trying to export a dynamically generated table to excel. I have used following code for the same
Response.ContentType ="application/vnd.ms-excel"
On some machines with excel 2000 version it is not working. The problem is that i have coded a session check for the user in that page and page is not getting the session value & it is redirecting the user to homepage for login in that excelsheet itself. That means instead of showing expected report ,excel sheet is showing contents of home page. I am not getting what is the connection of excel version with session.
I am trying to export a result set as an excel spread sheet. Most of the time this works as expected, when a user chooses to save as excel the browser pop-up a save as dialog to allow the user to save the spreadshet with a .xls name. Some times the browser will open up the file as text file within the bvrowser itself? These are my two lines of code to prompt the save as dialog for a Browser:
I am trying to export a recordset to an excel file using the Content Type below in the header.
Response.ContentType = "application/vnd.ms-excel"
Which works fine however the problem is that when I have a number in a column with a leading zero the zero gets dropped. E.G. 01760942 will be displayed as 1760942 . How can I rectify this?
Is this possible? I am planning to export data from SQL that generates HTML table. Instead of selecting the table and then copy then paste to excel, is ther a script(JS or VB) that will automatically export or open the Query to it.
The code below (partial) should export a file as Excel when the button near the bottom is clicked. The example I pulled the concept from uses a GridView for binding. I don't need to display it, just export it, so I created ExcelGrid visible=false at the bottom. The Response.Write(strQuery); is never getting executed. I get:
Exception Details: System.Web.HttpException: Control 'ExcelGrid' of type 'GridView' must be placed inside a form tag with runat=server.
I'm almost positive (from what you see below) that my ExcelGrid is inside the form tag, which contains the runat=server.
Any ideas? It works when you pull that code and just run the rest of the form so the runat=server is working for all of the other controls! Code:
I have a webpage that is taking input from a form and using it as criteria to select data out of an sql database. The page displays an html table with the results. The user can then click a button "excel" to open or save the file as an excel document. This works, and everything in the excel document is formatted fine except for the first column which in this case is "Part Number". The problem is that this part number: 883100105100 is displayed like this: 8.831E+11 in excel.
I am not sure how to format the excel cells using the asp/html so that it doesn't try to throw everything into scientific notation. I have thought that maybe if I gave excel a string value instead of a number value then it would fix the problem but I am pretty new to asp and am not sure how to do this. Below is the block that throws everything into excel in the first place. Code:
I've got a code that takes SQL query and creates a downloadable csv file, and it works fine. But, there is data that is getting seperated by commas that I don't want to be seperated. Like "Last Name" that is "Drake, Dr.".
I tried creating a tab delimited file (which I did) but it opens all wacky if I leave it as a csv file, and if I change it to txt then the download box doesn't open. The end users could select all the text and create their own file, but these end users are in desperate need of as much assistance as possible. Here is the code I am using:Code:
It works if the file in on the server side, how to use the component (DSOleFile) with the file on the client side? Also how can I calculate the width of the file. (Page set up - Landscape or porrait). Code:
Does anyone know of a method of converting text files to sound files (.wav, mp3 etc) which can be accessed from ASP?
I have an ASP-based website that enables users to design choreography for equestrian dressage. The resulting design is held as a series of coded movements in a database and it can then be reproduced as text or as a series of diagrams. I would like to offer the option of an audio version.
The title looks a bit odd, but it is what I really need I have different users, which I get the information from them in an ASP page, the data is stored in a SQL database, one of these users is authorized to check and close the data entry. Once the data entry is closed, an ‘Excel’ file should be generated according the entered data and be placed in a directory for use of other users. My problem is how I can generate the mentioned ‘Excel’ file by clicking a button in an ASP page and transfer the recorded data in it.
I have to add a feature, on click of button file open as dialog box will open and user can attach a excel file. Then we can able to validate, actually file attached or not, it is excel file or not etc.. if everything is ok app will will do further processing on the file.. Can anybody suggest me the easy way out without licencing issues.. Since vbscript and jscript is used any fee tool available...I tried to do it through MSComDlg.CommonDialog but it is a licenced version. Also I tried to do it through <input type=file> but here one text box and browse button gets added..
I am trying to create an excel file consisting of data from a SQL database using asp. I dont want the file to open up in the browser. I want the file to be opened in Microsoft excel. I have seen similar questions out here but no answers.
One of the pages of my application opens an Excel 2000 workbook in a new window using Javascript. The workbook is read only and I use a window.open command to open the workbook. On the workbook's BeforeClose event I have a code to avoid the 'Save' dialog: Me.Saved = True
If I open the page locally, change some content and close the workbook, the 'Save' dialog does not appear, as expected. As soon as I open the workbook on the web, the 'Save' dialog still appears when I close the window. I need to allow my users to change the contents of the workbook but they cannot save the workbook. Is my approach wrong? How can I avoid the 'Save' dialog?
Can anyone help with this? Here is the code I am using. The problem is, where it checks if a file exists, it always goes to else. Even if the file is there, it won't open the file, goes straight to else part of statement.
<% If Session("strLogID") = "" Then Response.Redirect("http://website/pages/login.asp")
I am creating a webpage and have a form where a visitor will choose a day, month, and year. I want to pass the data from the form into an asp page which will process it and put it into a string and open the excel file requested. The excel file to open will depend on the day, month, and year chosen in the form.
I have a asp page which will get the data from multiple tables (with functions and procedures)and display data in HTML tables <TABLE> on ASP page.Is there any way we can create a excel file from the output of this ASP file.I know how to export if this information on ASP page is coming from single query from a database table.
I need to give users the option to enter a zip-code in a html form, and then search through an excel-file for that zip-code. If any entries are found, then I have to output these as html.
How should i start? And what if several users tries to search the excel-file at once?
Basically I need to search the excel-file as I would search a db.
I've done a few searches on google, but haven't really found any relevant info.
How to import a text file into Excel file using macro? Can this process run on the form menu button? I have attached a text file for your reference. Please give me some ideas of doing it
I' m trying to import an Excel file in a SQLServer db. If I specify the spreadsheet name it works correctly. Now I'd like to import the spreadsheet without specify its name. Is there a way to retrieve the spreadsheet names of my Excel file in ASP?