Forum Moderators: open
I have a villa that I send quotes out regularly through out the day. Per the site I am on I have to send a quote with my email and I can not send automatic emails.
I have an excel spreadsheet that I calculate the quotes on and then I used to just copy the page and place it in hotmail, and bobs your uncle it is done. However when Hotmail changed it would mess up the format of my quote and it was a mess, so I am trying to make it better.
I have managed to write a small amount of html that allows a neat quote. But I need to somehow add in for it to automatically put the quote in.
Here is the code I have for the quote where the #*$!'x are needs to be automatic or linked from the excel file.
<html>
<head>
</head>
<body><table bgcolor=""<tr><td>
Hi,
<p>I am happy to say that we have availability for the #*$! nights that
you requested in our 5 Bedroom Villa, with a lake view. <p> Our reference
is <street address>, to go directly to our villa on <business name>
please use <a href=
"</a> </href> or view our personal website <a href="www.ecxample.com"></a></href> This site contains a
detailed description additional photographs and a floor plan.
<p>I have included a no obligation quote for you, this includes all
taxes.
<p>Villa Rental with No pool Heat#*$!X
<p>Villa Rental with Pool and Spa Heat#*$!X
<p>Villa Rental with Spa Heat Only#*$!X
<p>An additional security deposit of £125.00 is also required, this
will be returned to you no later than 4 weeks after your departure from
the villa, assuming no damage.
<p>A deposit of £ would be due with return of the booking form to hold
your dates, the balance is due no later than 8 weeks prior to your
arrival at the villa
<p>If you wish to book please let me know via this email and I will be
happy to forward you a booking form along with terms and conditions and
further booking instructions
<p>If you have any further questions, please feel free to contact me I am
happy to help
<p>Thank you
<p></td></tr></table>
</body>
</html>
Can someone point me in the right direction to get this to work, or should I forget it and just carry on copying the page from excel into notepad and then from notepad into hotmail. (I have removed the links to the sites incase they are not allowed)
Thank you
Julie
[edited by: tedster at 7:54 pm (utc) on Feb. 20, 2008]
[edit reason] switch to example.com, remove business names [/edit]
It is possible to use an ODBC (or is it oleDB) link to an excel document, but it's not standard practice as far as I know.
Makes more sense to use an access database and use vbscript and a connection string to get the data dynamicaly from the DB.
that is of course assuming you're running your website on IIS. If it's a linux server then you'll need to toy around with some PHP and I doubt you can query an excel document directly with php (though I might be wrong on that one).
so yeah, if you don't have zillions of villas to rent, I recommend a manual update :)
1) Paste the HTML that you have into your Excel workbook (on an empty worksheet). You should have each line of the HTML in a different cell. Make the column wider to fit the entire line.
2) For the lines that don't need to pull from Excel, you don't need to do anything.
3) For the cells that will need to get a value from Excel, change them...
...from:
<p>I am happy to say that we have availability for the #*$! nights that
To:
="<p>I am happy to say that we have availability for the " & Sheet1!B6 & " nights that"
4) The equal sign is the special character that Excel looks for to say "we're going to do some calculations." You will need everything from the equal sign to the closing quote.
5) Now, you will now need to replace the address "Sheet1!B6" with the address of the cell you want. If the cell is on a different sheet, you need to start with the sheet name ("Sheet1") followed by an exclaimation point. If the cell you want is on the same sheet, you can use with just "B6".
Hope that helps,
Chris