Can anyone help me to add multiple records from my excel file using classic asp.
Thank you for your help
The functionality to add multiple records in a bulk upload can be done through our API's using the Bulk Activities API. Using our Bulk Activities does require you to be uploading 25 or more contacts at a time. If you are uploading less than 25 contacts at a time we recommend using our Contact Collection API.
While it is possible to use our API's in Classic ASP, we do not currently have any examples for this. It is possible to also upload an excel file through our user interface, by logging into your account and going to the Contacts tab, and then clicking Add/Import.
If you have any further questions please let me know.
Thank you for your reply.. this is the code to upload txt file with more than 25 records.. It returns error code 400. Please tell where i am going wrong.
I am taking my file from html <input> control from the previous page.
I think the problem might be with highlighted line in the code.. Please check and reply...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
UN = "ABC"
PW = "ABC"
API_Key = "ABC"
List_ID = "2"
filename = request.Form("contact")
response.write(PostDataToURL(List_ID, "POST", UN,PW,API_Key, filename))
Function PostDataToURL(List_ID,strMethod, UN,PW,API_Key, filename)
lngTimeout = 59000
strUserAgentString = "http_requester/0.1"
intSslErrorIgnoreFlags = 0
blnEnableRedirects = True
blnEnableHttpsToHttpRedirects = True
strHostOverride = ""
strLogin = API_Key & "%" & UN
strPassword = PW
UpdateTimeStamp = date()
strPostData="activityType=SV_ADD&dataFile=" & filename &"&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2FABC%2Flists%2F2"
Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
objWinHttp.SetTimeouts lngTimeout, lngTimeout, lngTimeout, lngTimeout
If strMethod = "POST" Then
objWinHttp.setRequestHeader "Content-type", "multipart/form-data"
If strHostOverride <> "" Then
objWinHttp.SetRequestHeader "Host", strHostOverride
objWinHttp.Option(0) = strUserAgentString
objWinHttp.Option(4) = intSslErrorIgnoreFlags
objWinHttp.Option(6) = blnEnableRedirects
objWinHttp.Option(12) = blnEnableHttpsToHttpRedirects
If (strLogin <> "") And (strPassword <> "") Then
objWinHttp.SetCredentials strLogin, strPassword, 0
On Error Resume Next
If Err.Number = 0 Then
If objWinHttp.Status = "200" Then
PostDataToURL = objWinHttp.ResponseText
select case objWinHttp.Status
PostDataToURL="0"&vbtab&":Bad Request. Check Submitted Data"
PostDataToURL = "0"&vbtab&":" & objWinHttp.Status & " " &objWinHttp.StatusText
PostDataToURL = "Error " & Err.Number & " " & Err.Source & " " & _
On Error GoTo 0
Set objWinHttp = Nothing
I just wanted to let you know that we have recieved your post and are looking at it to see what we can do to resolve this. I will update this thread as soon as I have any updates. Thank you.
Unfortunately we do not have anyone here that is familiar with classic ASP to assist in troubleshooting this. I have done a fair amount of research on this and found that most people recommend using a component to assist in the file upload process. These are typically much faster and easier than attempting to modify an existing script to do this. One of the more useful articles I found on this is located at http://classicasp.aspfaq.com/forms/how-do-i-upload-files-from-the-client-to-the-server.html. This contains links to a number of free and paid components that can assist with this.
I hope that this helps and apologize for any inconvenience that this issue has caused. Please let us know if you have any other questions or concerns and we will be happy to help.
Hi, i have made an excel document with a table in it so i can type in some numbers and it will do calculations on it. I was just wondering if there was anyway to kind of turn this excel file into some sort of exe or flash file, something to make it full screen or just to have all the editing tools blacked out so its just the table with my inputs? I want to be able to click an icon on my desktop and it will just load up my table. If anyone knows the type of thing i want i would be very grateful. Thanks orange county web designer
Unfortunately this is really more of a general question not really related to Constant Contact. If you have questions about using any of that data within Constant Contact, I would be more than happy to assist with that. I am also not really to direct you to a more relevant website as I am not sure what programming languages are familiar with or which you would prefer to use. I apologize for any inconvenience this causes. If you have any other questions or concerns regarding Constant Contact, please let me know and I will be happy to help.