YNAB can export all of your account and budget data to a CSV file so you can analyze it in Excel.
To accomplish this click File > Export and you will be prompted with 2 options:
Once you choose Export to CSV YNAB creates 2 separate files with a .csv file name extension and the name of your actual budget. (The example below reads My Budget).
You can now use Excel or most other popluar spreadsheet software to open up the file and work with the data.
If your currency uses commas instead of decimals as in 123,00 instead of 123.00 you will need to do the following in order to get Excel to open the files.
This will prompt you to import data from a text file, which will correctly import the file.
For more on this subject please check out this article on the Microsoft site.