Skip to main content

4 posts tagged with "excel"

View All Tags

Joomla - Run a SQL statement outside Joomla and display a nice HTML table

· 5 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Joomla - Run a SQL statement outside Joomla and display a nice HTML table

A long time ago, years from now, I needed to expose data from my Joomla site in a simple web page outside Joomla, as an HTML table. This was so that I could link a Microsoft Excel spreadsheet to this table and therefore, in Excel, simply do a Refresh to obtain the most recent data from my Joomla site.

The aim was to find the list of people who had bought software or services from me. Among other things, I needed their first name, family name, billing address, etc. so that I could create an invoice in Microsoft Word using the mail merge functionality (data source=Excel).

Real world use case

Oh, wait, so a web page that would execute a SQL query of the type SELECT ... FROM ... WHERE ... against the Joomla database, retrieve the records then display them in an HTML page so Excel can link the table and Word can retrieve them and generate f.i. pdf. Cool, isn't it?

Of course, just running a query on your database and show the result as a web page can be really useful.

MS Excel - Connect to a SQL Server database, run a query and get the results

· 2 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

MS Excel - Connect to a SQL Server database, run a query and get the results

Imagine you can execute a query like SELECT customer_id, first_name, last_name, email FROM customers ORDER BY last_name ASC; in your Excel sheet and that Excel will connect your Microsoft SQL Server database, run the query there, get the result and put the data directly in your sheet. Would be nice, no?

Imagine your sheet has already a nice layout with colors, titles having filters enabled and f.i. has a name (like rngMyCustomers). It would be nice if the updated data still keep all the layouts and just extends the name; no?

Stop imagining, it's just so easy!

MS Excel - How to call a SOAP web service

· 5 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

MS Excel - How to call a SOAP web service

Imagine you had to make a call to a SOAP web service in Excel? For example, to validate the VAT number you have been given before carrying out some processing.

You will call the URL that corresponds to the web service you want, but you will also need to pass a number of parameters in XML format so that the service knows what you want to do.

We'll learn, in this blog post, how to validate a European VAT number using the VIES VAT number validation SOAP web service.

The VBA code we will see in this article can be used as a skeleton for your future development.

MS Office - How to create a ribbon in Excel

· 10 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

MS Office - How to create a ribbon in Excel

In this post, we'll learn how to create a ribbon (i.e. a toolbar) in Microsoft Excel.

We'll create our custom ribbon for an Excel file, save the ribbon in the file so our users will have a nice and intuitive interface to work with our worksheet.