[Tutorial] Guestbook with Excel as database

[SIZE=4]How to make a webbased guestbook with Excel as database.

[/SIZE]If you want to make a guestbook or other kind of messaging system for a web application, and you don’t have a database available like MySQL with PHP or with ASP, then I have this nice solution for you.

You can use Excel as a database it’s not supposed to serve as database for a web application, but technically it is possible.
So if your company ran out of budget or tools for a good database, read this page very carefully.

Note: [B][SIZE=1]it is somehow buggy, it works only in IE in a Windows environment, and it does not work online because of browser securities. But it is a valuable solution for an intraweb or intranet.

[/SIZE][/B]Here’s the tutorial with Demo:

Some knowledge of Html, VBScript, Javascript and CSS is handy for this.

[SIZE=1]I started building it first with a ADODB object and JET driver stuff etc… but every time I did a transaction to add or read something from the Excel file, I got a security popup that I couldn’t get away. It was kind of annoying.

So that’s why I made it without these ADODB things…

But the advantage with ADODB is that you can make queries from your excel file for generating nice output. Maybe someone has some ideas to make it better?[/SIZE]

What a very clever (and ingenious) idea!

As a way to skirt the troubles you described, do you think, with Javascript, you could read/write to a CSV file? Then Excel could read [import] it in order to generate reports.

I’m not sure about that… but with VBScript, you can immediately write into an excel file, so you don’t have to import CSV files anymore.

I know it’s totally the wrong way of making a guestbook…
But at work, I had to make a webbased project (which was more complicated and had lots of different features) where I was not allowed to use any kind of good stuff like PHP/MySQL or normal webbased server/databases. My boss didn’t allow me to install anything like that to make it work like a normal website.

But somehow, I had to store data into some kind of database… I knew I could connect html with javascript, javascript with vbscript, vbscript with office applications. I tried with access, but it gave me lots of troubles and then finally with excel.

So I ended up creating a messaging system for my management, so they can write messages for a whole team of users underneath them. The message system has several other features:

  • only titles of the messages are displayed, if you click, a jQuery animation opens the whole message
  • the titles are colored per theme
  • they can add multiple attachments (the files get copied from directory to directory with VBScript, not overwriting existing filenames)
  • they can edit every message afterwards, changing the attachments etc
  • they can delete every message on the same control panel
  • a search box to search through all messages, by theme, by content, by date, …

  • And all that is stored into one simple excel worksheet.

It gave me a headache programming this, with all the testing and errors… but since it’s up and running from one year ago, it didn’t have a downtime, yet.

I needed the proper easy to follow help/guidance to use the excel as database. thanks to you and the tutorial is extremely helpful for me… :slight_smile: