Date Field/Excel Spreadsheet Problem
I've inherited this asp page. It builds an Excel spreadsheet, but it's not putting the date in the spreadsheet and I don't know why. here is the code (see bold-red line): ...
View RepliesI've inherited this asp page. It builds an Excel spreadsheet, but it's not putting the date in the spreadsheet and I don't know why. here is the code (see bold-red line): ...
View RepliesI have my excel spreadsheet generating just fine. What I'm trying to do is format each cell to something other than "general" I've figure out how to format to currency:
<td>$<%=variable%></td>
I really need to format to "text" though. Anyone have a good link to a chart that explains how to format to all of the different possibilites, or just how to format to text?
I'm successfully using Response.ContentType = "application/vnd.ms-excel" to generate an Excel spreadsheet from an asp page and a SQL Server database.One of the columns contains data that is a long number (13 characters eg. 1122334444566).The spreadsheet does not display the number correctly because the column is formatted as 'General' so it displays 1.12233E+12.To correct this in Excel I simply change the column type to number. How do I get around this in asp.
I know I could use fso to create the spreadsheet on the server using a template, but I prefer to do it on the client side so that I don't accumulate a whole lot of xls files on the server.
What is the syntax to connect to an excel spreadsheet as well displaying contents of a column.
View Replies View RelatedI have a report that the user can view either on a page with HTML or they can open it in Excel.
I am attempting to change the content type with this statement:
response.contentType = "application/vnd.ms-excel"
But it appears that when I do this I lose all my request variables and my recordset is null.
I am creating a website in which users will be able to query an sql database by several different criteria (i.e.- name, department,supplier, part#, date). What will return to the user will be a webpage with the column headings that they selected in their search criteria (i.e.- name, supplier, part#) and below those column headings, a list of the results.
I want the user to be able to print this report or export it to an excel file, this is the part that is tripping me up.Any ideas about this? Am I going about it all wrong?
How to using asp script update data in Excel Spreadsheet with style (ie, Bold, Font Size ..) ? Is it possible to do that ?
View Replies View RelatedI'm using the Excel application object to create a
spreadsheet from a recordset. Everything seems to work
fine except any date fields are not displaying properly.
For example 4/18/2004 is displaying as 38095 in the
spreadsheet.
I loop through the recordset to display each row. The
line that actually writes out the field is:
objSpreadsheet.Cells(iRow, iCol).Value = objField.Value
Any suggestions?
I am trying to import an excel spread sheet, my first step is to be able to see the spreadsheet on the webpage, Code:
View Replies View RelatedWhat 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'.
View Replies View RelatedI have asp project where large volume of data entry would be done. I am
trying to find out if there is any tool that can allow me to build asp
application where the forms would be like excel spreadsheet.
I'm exporting tables to Excel, but they seem to format with an extra row between every record. The table is output in HTML on one line, so it doesn't seem to be a white space problem.
View Replies View RelatedHow to using one excel template to insert data into another excel spreadsheet by using asp programming ?
View Replies View RelatedI've been reading through all related Excel posts now for about an hour as well as Googling for my answer and I'm getting even more cornfuzed as I go. I have an Existing Excel Spreadsheet, I need to populate certain fields of the form with values from a Database.
I have no problems connecting to my database and pulling up the data, but I have no idea where to begin with opening my existing spreadsheet, then telling it which worksheet to use and then how to populate the fields I need.
I'm not looking for an entire code handout, this is just something that I haven't attempted before in ASP. If someone could just give a quick example of first opening the existing spreadsheet, selecting the correct worksheet and populating 1 field, I think I can figure everything else out from there.
I want 2 create a survey Web Form that people can fill in. I then want the data entered to be saved to an Excel spreadsheet located on a server.
Can .ASP handle this kind of task? and if so does anyone know the code required to perform this function?
The data entered will be RAW and the .ASP (or whatever required programming) will need 2 process and convert the data into the spreadsheet.
Also, would it be possible to run this from a stand alone machine so that the web form, .ASP and spreadsheet are all contained on the machine and have no outside influences?
I have a 2000 server running IIS 5. I need to send approximately 10000 emails to recipients from an excel spreadsheet with a small word document. These are requested emails, no spamming. I don't have a clue as to where/how to start this.
View Replies View RelatedI am using a Relational database for my site and i have the following tables:
FIXTURES, GAMEDATES
the fields in FIXTURES are:
GameDate
Home
Away
(All of the above are numerical fields)
the fields in GAMEDATES are:
DateID(integer)
GameDate(#Date Field#)
What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)
The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:
WHERE Fixtures.GameDate<=(Date())
obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.
The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.
Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data
i'm new here and i'd like to ask if there's someone who knows how to compare date() function and date from database with date/time type inside select statement so i don't have to do if..then..else
View Replies View RelatedIn a connection string, I have the following:
sql3 = "SELECT DISTINCT State FROM Property Where TypeID = '" & srch_cat & "'"
In the database, is a field called expiredDate I am trying to show only records whose expiredDates are greater than todays date, but I am messing up somewhere. The values in the fields are as this: 3/7/03 (or something like that...no time is added to it)
"SELECT id, title FROM Businesses WHERE Date_Added >= " &
Request.Form("Since_Date")
This SQL string returns all records from the table Businesses and does
not seem to be able to recognise Request.Form("Since_Date") as a valid
date. The Since_Date value is entered into a form field as
"01-Jan-2005" and appears to be treated as a date; when viewing the
SQL statement(with a response.write) it shows the date as 1/1/2005
even if it is entered into the form as 2005/1/1
I've also tried CDate(Request.Form("Since_Date")) with no luck,
although this was the treatment that worked when the SQL statement was
running in an .idc file.
Date_Added is a regular DateTime field in an Access 2000 database
Any suggestions please ?????
I've got a table of data that PHB wants to be able to download to excel to run pivot tables on. got all that working.. the catch though is that there is a column in the data that shows the Invoice Date, next column shows the Invoice Month and Year in the format of mmm-yy.
Works great in the browser. when you download it to excel, Excel turns SEP-04 into 4-Sep-2004, anybody have a good way to format the date so Excel doesn't "fix" it for me?
When I export my data from Access to Excel, my date format is change from dd/mm/yyyy to mm/dd/yyyy. How can I change the date back to dd/mm/yyyy?
View Replies View RelatedI am trying to retrieve a date field this is the code
strQ ="SELECT * FROM WaterCompanies ORDER BY WaterCompany"
set objRS=objConn.Execute(strQ)
This is where I am using the date
Response.Write "<TD>"
Reponse.Write objRS("JoinDate")
Response.Write "</TD></TR>"
all the other fields populate so I know I have a good connection.
this is the error
Microsoft VBScript runtime error '800a01a8'
Object required: '' /waterbilling.asp, line 76 <--- this is the response.write objRS("JoinDate") line
i need help formating todays date minus one.
i can get this 1212006 but i need 12012006
how to pre populate the date field in an asp form which is using SQL database?
View Replies View RelatedI have a few date fields on my form. The backend is SQL and the fields are set to smalldatetime. Adding records into these fields is not a problem. This is my code:
if Request.form("ScheduledTrainingDates") = "" then
else
objRS("ScheduledTrainingDates")=Request.form("ScheduledTrainingDates")
end if
The problem is updating the records when I got to edit them. Let's say I have a value in for ScheduledTrainingDates textbox, and I want to clear the value and leave it blank and save it to the database. How do I do this?
I have a form field which asks for a date to be entered in the format of dd/mm/yyyy. Now, I've successfully programmed it so that you can only enter a date in the present or future but not in the past. However, as it stands, it also means the user could enter an unrealistic date such as 12/12/2070...I don't want this.
What I'm after is some ASP code which only allows the user to enter a date that occurs between the present day and say, the next month. So if the user was to enter 05/03/06 then the valid dates that would be acceptable would be any date before 05/04/06 i.e. One month.
I'm trying to create a search page with a beginning and ending date, but I can't seem to get it to work. I am using SQL Server. Here is my statement:
SELECT *
FROM dbo.REQUEST2
WHERE REQUEST_DATE BETWEEN ' " & Request.Form("txtBeginDate") & " ' AND ' " & Request.Form("txtEndDate") & " '
This statement is not returning any records when I know there are existing records that fit the criteria that I'm entering.
I have a form where I offer the user to enter a 'fromDate' and a 'toDate' whereby I had hopes that it would help return records where the date was between those two values. My SQL query ends with: Code:
AND Date < " & request("fromDate") & " AND Date > " & request("toDate") & "
and a typical date entry in the table looks like: 2/8/2005 .
Need some help with comparing a date field retrieved from an access date base to the current date. Basically I'm looking to create and if statement like:
If strArticleDate < = Current Date then
else
I have an asp page that uses a calendar.js (pop-up) file to add an
exact date format in the text field (txtDDate). My problem is I need
some javascript that sets an alert that does not allow them to select
today.
example:
var dtToday = Date()
if(document.frmSoftware.txtDDate.value == dtToday)
{
alert("You cannot select same day distributions. Please enter a new
value in the "Delivery Date" field.");
return false
}
But dtToday seems to be blank....How can I get dtToday value? Also,
when I set the dtToday value outside javascript and used a
Response.Write to see what format Date() came up with - it gave me
1/24/2005 - but the calendar pop-up gives me 01/24/2005....could this
also be the issue?
I'm trying to post a value from a form field into a database field of type Date/Time formated to short date.
Even though the value from the form comes in short date style ie 19/06/2004 I'm getting a type mismatch error
I cannot get the date format correctly in dynamic sql statement, after trying various ways of handling it. I need some help with the date format in the following dynamic sql statement. Any help is appreciated in advance. While running the asp page, I still get an error as Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'Format'
DYNAMIC SQL STATEMENT:
sql = " INSERT INTO tblExpense (ENO, EntryDate, ContractedServiceExpense, "
sql = sql & "TravelExpense, PersonnelExpense)"
sql = sql & " VALUES('" & l_ENO & "', " & Format(l_Date,
"#mm/dd/yyyy#") & ", " & l_contractedserviceexpense & ", "
&l_travelexpense & ", " &l_personnelexpense & ")"