If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Exporting excel data into JavaScript

Hello everyone.
I am new to programming, please help.

Here is my situation:
I have an excel file, it contains data (over 1000 lines) and VBA code. I want to relocate this mini application into a web page, i.e. transfer my data from excel and create the same logic.

In my understanding, the following steps are necessary:
1. Transfer data from excel to .html (or .xml) in a way that necessary lines/cells can be manipulated (e.g. with ID generation for those lines/cells);
2. Adding logic with JavaScript.

Now I am focused on step 1.
What is a good way to transfer?
Description of data: my contacts list: their details such as position, contact info etc. (one line per person). This includes birthday.
The logic necessary: return those people who have a birthday today.
So, the data must be transferred so that a particular attribute (birthday) can be manipulated with JavaScript.

I think it is possible to have php or ASP.net webpage start Excel with some command line arguments on what data you want (birthdays). Excel would write a text file of JSON data. php would send the data back. I create Javascript objects today using Excel VBA. It is easy to edit data in Excel.

Excel VBA has a capability to connect to a sheet as a database and use sql commands to query the data. I have used it a lot in some Excel VBA addins. You could pass an sql command.

I am doing something similar now. The user fills out a form on the web and the data is put into a database. Php starts an Office Word addin and it reads the database and creates a Word document based on a predefined template. The php program passes back the file location.

I still think you should look at using a database. You could use an Access db. Php connects to Access using ODBC. You can easily import your Excel data. Another option is Access can link to Excel spreadsheets. You could still enter your data in Excel but just use Access to get data from the web. In fact, thinking about it I recommend this approach. A lot less programming.