VBA Boilerplate
Dreaming of having a boilerplate for Excel VBA project? Or you have other dreams, which are more normal? Well, I cannot help in the latter case, but if you want a boilerplate for VBA – here it is!
Dreaming of having a boilerplate for Excel VBA project? Or you have other dreams, which are more normal? Well, I cannot help in the latter case, but if you want a boilerplate for VBA – here it is!
Following the Microsoft tutorial for building a .Net Standard library with Visual Basic from here, I have decided to make a video for .Net Standard library with C#. Pretty much, it is one and the same. The library contains one …
C# – Build a .NET Standard library with Visual C# – Video Read more →
There are quite a few methods for writing data from a text file to Excel. The main are the following: Through a Query Table Through opening the text file and Reading and writing line by line Reading the text file, …
Unit testing is the “sweet” part of the programming – once you have tested “all the things”, you feel that the code you have submitted somewhere is actually valid and somehow it works. Furthermore, it allows you to nicely brag …
Some time ago, I have received the book of Stephen Wolfram – Adventures of Computational Explorer for a review. Stephen is the guy behind WolframAlpha – https://www.wolframalpha.com/, a PhD in physics before his 21. birthday, considered a prodigy by some …
Book Review – Stephen Wolfram – Adventures of Computational Explorer Read more →
Although there are plenty of other tools for extracting data from a website (take a look at Beautiful Soup), VBA is somehow good, because … well, because it is somehow challenging to do it every time. Yesterday, I answered a …
VBA – Extracting financial data from a website in table format Read more →
Statsmodels is a nice statistics library in Python, which eases the data processing and analysis with Python. The library is available here – statsmodels.org and on its official web site the installation guide is always up to date. In the …
Some 4 years ago I wrote an article for calculating magic square with python. What the article did was actually checking whether the square is magic, and not calculating a new one. This one is going to show how these …
Excel – How to build magic square with VBA, following Python Mod Mathematics Read more →
Working with Pandas is like working with Excel on steroids – it can really do a lot of things fast, but somehow doing the easy things get complicated. In this video and article tutorial I am presenting loading data to …
Python – Plotting DataFrame and Working with Pandas – Video Read more →
Greedy algorithm is described as an algorithm that follows the problem-solving heuristic of making the locally optimal choice at each stage with the intent of finding a global optimum. Thus, it is always interesting to find a problem, which can …
Python Slice Notation is somehow easy and tough in the same way. Lately, I was doing some competitive programming with Python and I have decided to write a summary of the slice notation, thus there is always a place for …
Codeforces has introduced a third division in their competitions. Initially I though this is the place to go for “easy” stuff, as far as some of the 2nd division problems require some advanced algorithms, like combinations of graphs and months …
Python – Binary String Minimizing Problem – CodeForces Read more →
So, my idea was to obtain all the elements, tagged with “li” from here – vitoshacademy.com/all, using BeautifulSoup4 and Python. Initially, I thought about running a simple soup.findAll(“li”) , but it also added the text from the menus, which were …
Find all list (li) elements in a special position of a web site Read more →
Scraping data from a web site has always been a pleasure with Python. If you come from the VBA world, the BeautifulSoup4 is indeed beautiful! I have been scraping a web site with python before, but now as I have …
Scraping a web site up to the N-th level with Python Read more →
Dropdown lists in Excel usually are built from a range or from a variable list. Dropdown list from Excel Range Thus, building a dynamic dropdown list may include building a dynamic range, with undeclared end. Thus, let’s imagine that the …
Dynamic dropdown list in Excel VBA with variables Read more →
About 4 years ago, I wrote an article about prime numbers in Excel and their visualisation with VBA – vba-function-in-excel-to-check-prime-numbers. Pretty much, it displays the prime numbers in a 10 x N matrix, starting from 1 and finishing at N: …
Prime numbers matrix and coloring with Python and xlsxwriter Read more →
Scraping a web site with BeautifulSoup 4 and Python is a walk in the park, if you have scraped a web site with VBA before. Still, there are a few tricks, that should be taken into account. Trick #1 – …
Scraping web site and writing its links to a database with Python Read more →
After reading the database to python from the previous post here, it is time to do the ADD data to the database. Our database is created like this: CREATE TABLE “drummers” ( “Id” INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, “Name” …
Connecting SqlLite3 database to a Python file is actually 1 line of code: conn = sqlite3.connect(r”C:\Users\database.db”) I have used a database from sqllitetutorial.net, which was rather neat. Then DB Browser for SQLLite a LEFT JOIN was implemented, in order to …
Connecting SqlLite3 database to Python and Reading it Read more →
Life is hard, when you are learning Python and you see things that are making no sense the way they run. After writing about adding data to SqlLite3 with Python, today I have tried to do the same, but for …
Adding data to SqlLite3 database, but only one value with Python Read more →
Finding all HTML tags from a web page and recording these to a dictionary is magically easy task with Python (if you compare it with #VBA), when Beautiful Soup 4 is used. soup.find_all(True) loops through the tags and a simple …
Find all HTML tags in a web page and print them from a sorted dictionary Read more →
Writing formulas with Excel with Python is a technique, that needs some practice, actually. Although XlsWriter has some good documentaion, not a lot is covered on the point, that concerns creating a file with a formula in it. First and …
Write Formulas in Excel through Python XlsWriter Read more →
Writing to a file in Python is usually a simple 2-liner, which is easy to be written: with io.open(“soup.txt”, “w”) as file: file.write(soup_written) However, problems with the encoding may cause some research needed. Concerning the encoding this is …
Writing to a text file in Python from a variable, ignoring encoding problems Read more →
Showing all links from a website with Python and BeautifulSoup is actually 6 lines of code – 2 to define the used libraries and 4 to do the job: import urllib.request from bs4 import BeautifulSoup resp = urllib.request.urlopen(“https://www.vitoshacademy.com”) soup = …
Show all links from a website with Python and BeautifulSoup – Video Read more →
The birthday paradox is an interesting problem, mainly because of its somehow “unexpected” results. The problem usually is stated as the following: What is the minimum number of people in a room, in order to have a probability higher than …
The Excel Workbook object is a part of the Workbooks collection. The events are the code, which is “activated” or “triggered”, once a specific event happens. These events are different and could be unlimited, but there are a few built-in Workbook …
VBA – How to implement workbook events in Excel – GIF Read more →
After writing the article scraping a web site up to the N-th level with Python, I have decided to summarize what could be achieved with Set() in this language. Pretty much, sets can be described as lists with a few …
Sets in Python – Differece, Symetric Difference, Union, Intersection Read more →
Last week I was participating at the Python and ML Summit in Berlin. One of the most interesting lectures, on which I participated, was a workshop by, named “Reading all yourself was yesterday – How to turn large amounts of …
Numpy and Pandas – Small introduction with Jupyter Notebook Read more →
This Monday and Tuesday (14. – 15. October 2019) I was in Berlin, participating at the #Python and #ML Summit. Actually, #Berlin is a nice city, one of my favourites in Germany, thus if you are not from there, only …
Python and MachineLearning Summit in Berlin – Summary Read more →