I was having a go at importing a page written using HTML embedded with some ASP and SQL commands into an Excel sheet.
Now I have tried using the command below and no luck. After doing some Google searching I found some people suggesting removing HTML and BODY tags which I did but no luck. Tried using HTML and BODY tags and still no luck and all of a sudden I hit a brick wall. Code:
I've seen lots of posts on this and other boards, but nothing seems to work for me. I need to import data from an Excel spreadsheet using ASP. None of the ranges in the spreadsheet are named. I'm using this code:Code:
<% Set ExcelConn = Server.CreateObject("ADODB.Connection") Set ExcelRS = Server.CreateObject("ADODB.Recordset") ExcelConn.Provider = "Microsoft.Jet.OLEDB.4.0" ExcelConn.Properties("Extended Properties").Value = "Excel 8.0" ExcelConn.Open "c:inetpubwwwrootaspcalendar est.xls"
set ExcelRS = ExcelConn.Execute ("SELECT * FROM [Sheet1$]")
Response.Write(ExcelRS($A$1))
%> I've tried every variation on "ExcelRS($A$1)" that I can think of - I've seen "ExcelRS(1,1)" used, but that doesn't work... What is the syntax for accessing Excel data by cell coordinates?
Importing EXCEL worksheet into existing ACCESS tables is possible.
Is there any way i could import EXCEL worksheet into an existing ACCESS table using ASP code.Something like, i could upload a EXCEL file from a browser and then it can be imported into an existing table And if possible also check for duplicate keys and update those records. If no records exist then insert them.
I'm importing from a csv file but got the following error :
If theres a newline field in one of the columns (i.e with a text field) and I want to read that line from code it see everything after the new line as a new line.
If I open the file in notepadeverything's on one line as it should be, but somehow the importing mess it up.
I am having a problem displaying data into an ASP Listbox , when I import data in random named field names say 1, 3, 5 from SQL empty records of hypthytical 2,4 are shown inti ASP listbox
I've got a csv file which I will need to import into an access db via asp. The csv file will be imported every day of each month so there will be duplicates which will not need to be imported.
I'm trying to import my outlook contacts into my access database using a .csv file. i want to be able to browse for the .csv file and hit an upload button on my site and be able to see them all.
Is there a way of importing information from an Excel document or a comma delimited file to a database using ASP.
Has anyone tried doing this before? I'd love to know how you did it. At the moment, I'm thinking of uploading a file, opening it with FSO then creating an array (or something similar) from the content of the file. If there's an easier way of doing this (with components etc) please let me know.
I have an XML file that gets updated every 4 hours on a web server. I can check the XML modification time in ASP and compare to the databse. If it is newer, I need some ASP code to then import the XML into Access. Been trawling the net for an answer for a while .
We need to import the contact details from Act! and Outlook/Outlook Express (Both) to a website (hosted database MSSQL or Access). Is that possible in any ASP Scripting?
I have intermediate experience with asp, and sql. I am stumped on how to properly do a project, and hoping that one of you can point me in the right direction instead of playing the trial/error game for 2 weeks!!
Basically, I have a program that exports information into a html file for viewing of results. The file contains event information, user information, and results of each individual user along with statistics of the event. I want to take this generated file, and import it directly into a sql database (point and click upload of sorts to be user friendly) for further data mining. Code:
am creating a asp page that wiil fetch data from database and export that to excel. not using excel objet, am creating a HTML table to display the data. Now that it displays the data correctly in IE, I want to it to be stored in excel file too.
If I create a file in code, it creates the file. But the file shows up 0 bytes. and holds nothing. Anybody pl guide me how would I redirect my output to the excel file.
What would be involved with having an Excel spreadsheet displayed in an ASP page? The additional problem is that the file name changes on a monthly basis. For example, this month's file name is 'Feb 2005.xls'.
I am working on a project that involves importing IIS Log files into a SQL Server database (and these logfiles are big --> Some up to 2GB in size).
Up until now I thought that DTS or the BULK INSERT command was the fastest method out there, but still proves to be long (taking an average of 45mns to an hour to process each log file).
Because I have to import the log files from three web heads in my cluster (therefore 2GB log files per server times three servers), this really throws off the concept of "real time" or near "real time" reporting.
So that begs the question. WHAT IS THE MOST EFFICIENT, AND QUICKEST TEXT-FILE TO SQL SERVER IMPORTING TOOL, METHODOLOGY, SAMPLE CODE, WHATEVER, OUT THERE??? Code:
I've been asked to develop a semi-automated type situation where we have a database table (sql server) and periodically, there will be a comma delimited file from which we need to import the data, replacing the old.
I naurally know that we can use [truncate tablename] to kill the other data, but does anyone have any examples of importing a comma delimited file into SQL Server with ASP?
i'm trying to have excel open up a webpage which basically contains a table.
in excel 2000 if i specify content type text/csv this works by displaying an open/save dialog box and clicking open, launches excel and displays data as a table (desired result ) however in machines with excel 2002+ excel simply displays the html code.
trying to specify application/excel opens an excel plug-in inside the browser which poses a problem becouse the excel has links to pdf file that obscure the plug-in.
I have an asp page that collects data from a database and then displays it in a table on the page. I also want to be able to put this information into excel. I know how to get the page to load up in excel and then display the data using the following command -:
response.contentType = "application/vnd.ms-excel"
however I want it so that there is an Extra button on the page that the user can press to transfer the data accross. Does anyone know how to do this?
I need to show some results from a database on a page and also give the user the option of downloading these specific results as a excel spreadsheet ....
we have web users that have requested the web application access an existing excel spreadsheet directly.
Users have an excle spreadsheet with complex functions, macros, formatting etc. They have data in the database that is accessed via a web applciation. They would like to use the web app to get the data they want on screen and then click a button to get that data and put it into specifc cells in the spreadsheet. is this possible?
My boss wants me to develop this page so that users can click on a button alongside an employee's page and this will open up the company Expenses Claim Form with some of the fields automatically filled in, pulled from the same SQL database that the webpage gets its info from.
I have been looking this up for *weeks* now, but the only solutions I can see involve the dot net framework, 3rd-party plug-ins or installing the Microsoft ODBC driver for Excel. My boss will not accept any of these solutions, as we are a huge organisation and this has to work accross the entire system. We're stuck with MS Office 2002, Windows XP and SQL Server 2000.
So far the best I can manage is getting the Excel form to open (but without the fields filled in), which I accomplish using the following code:
Since I updated Office 2000 to SP3, my ASP code has failed when executing this function:
(the HPageBreaks.Add line fails) function insertPageBreak ( xlsObject, strLocation ) with xlsObject .Range( strLocation ).Select .ActiveWindow.SelectedSheets.HPageBreaks.Add .Range( strLocation ) end with end function
Parameters: xlsObject is a valid object of excel created with: Set xls = CreateObject("Excel.Application")
strLocation is a string in the form "Axx" where xx is the current row number, e.g. "A54"
I had to uninstall and reinstall Office 2000 without service pack 3 in order for it to work....
My asp/sql server application gets an error, but only when you use the Excel export option:
<% Response.ContentType="application/vnd.ms-excel" %> (very popular w/ users)
I think somebody entered a string of characters that Excel does not like:
So I believe (but not sure) some character(s) in a Ntext sql server field "desc_text" is confusing the Excel file and causing it to error (and crashes Excel)
So far, I have attempted three fixes with no success
1) Tried to convert the data type in the SQL query: CAST(sr.desc_text AS VARCHAR(255))
2) Tried to convert the data type in the vbscript: <% desc_text1 = Cstr(rs.fields.item("desc_text").value)%>
3) Tried append an apostrophe to the beginning of the field so that Excel would not read it as a formula. (this might have worked, but Excel does not treat an apostrophe the same from an export as it does if you typed it in directly)
Also, if you have any ideas on how to isolate and identify the specific record and character(s) that is causing the error, that would be great. I have it narrowed down to a record set of 600 records, and the error occurs if I include beyond the 130th character position. The problem does not occur if I use CAST(sr.desc_text AS VARCHAR(129))
Does anyone know where I can find an easy example of how to read an Excel or XML file and automatically populate a table on a ASP page?
I want to create an asp page that has a table on it that reads from a XML or Excel file so I can update the file and the table information changes accordingly. I know this has to be somewhat simple but I cant seem to find any exmaples. I probably am not searching the right keywords or something.
Any suggestions on where to find an example script to do this?
I'm using asp to retrieve data from a server and import that data in a client that uses MSAccess, into a memo field. The text hes line breaks 0D 0A (the usual DOS line breaks). However the client sees these line breaks as two squares!
The strange thing is that when I look at the exported text (yes, I also export text from the client to the server), it also contains the same line breaks. So the exported text from the memo field can look exactly the same as the imported text, and before the export the line breaks are correctly shown als line breaks, but after the import that same line breaks are shown as squares! I would like to see line breaks after the import and NO squares.
Basically, I want to have an asp page that has a button where when you click on it, it opens up a file open dialog box where you can search for any excel file you want to import. Then, once a file is selected, I want to read all the contents of the excel file (from column A) to display into a listbox on the screen (so that each individual row from excel file would be a separate item in the listbox). Also, this data would have to be inserted accordingly into an access database .....
I have 3 asp pages. The first page (login.asp) takes the parameter values(userid, groupid, locationid and deptid) based on the login (validate using a table). On submit the page params.asp is executed. Here the user has to select the filtering.
Then the page results.asp is executed. When the result is in excel format only the parameter value p_attdate (p_attdate is the value on page params.asp) contains a value.
The value of p_gid(p_gid is a session variable) remain null. BUT when the output is in html format, the parameter value p_gid return the correct value. I want the output to be in excel format but the sql statement is returning the wrong result. Only p_attdate is returning the correct value. I think because p_attdate is a form variable.
Can anyone tell me why value of p_gid is always null when the output is in excel format???
I am having trouble downloading an excel report generated from our AS pages. We presumed it was something to do with the SSL certificate w just installed, so loaded the ForceSSL.inc script from Microsoft an changed the cache settings by changing this code in our globals.as file: