/excel
Generate spreadsheets from ingame data with extremely flexible and customizable parameters, filtering and sorting.
Requirements
- Bot can send messages - to send the result excel.
- User can use application commands - so that the user is able to view and use the bot's commands.
What It Does
/excel is a command which generates a .xlsx file filled with exactly the data you ask for. This info can be about provinces, countries, coalitions and market and it builds a sheet per data type introduced.
IMPORTANT! this command needs parameters. If nothing is provided, it won't work.
| Part | Syntax | What It Does |
|---|---|---|
type |
provinces | countries | coalitions | market |
Chooses which sheet you want. |
entries |
field1;field2;… |
Columns (or synonyms) to include. |
filters |
field+op+value (separate multiple with ;) |
Filters your rows (e.g. morale+>+50 or name+startsWith+"ala"). |
sorters |
field+asc|desc (separate multiple with ;) |
Orders your data (e.g. name+asc). |
You can concatenate multiple sections by separating them with ;;.
Each section follows the same type–entries–filters–sorters pattern.
If you skip filters but still want sorters, just leave the filters part blank:
provinces–id;name––name+desc
You can check out some examples here.
Filter Operators
Note, all strings are not case sensitive
equal(=,==,eq,equal) - exact matchnotEqual(!=,neq,notEqual) - mismatchgreaterThan(>,gt,greater,greaterThan) -1 numeric >lessThan(<,lt,less,lessThan) - numeric <contains(contains,has) - substring presencestartsWith(starts,start,startsWith) - prefix matchendsWith(ends,end,endsWith) - suffix matchin(in,within) - is in a list (e.g.2,3,4or"Grain","Fish")
Parameters
| Parameter | Type | Required? | Description |
|---|---|---|---|
gameID |
Number | ✔️ | ID of the target map/game. |
params |
Long text | ✔️ |
Sections split by hyphens (-):
;;.Explained deeper in the What It Does section |
‼️‼️Show full fields reference‼️‼️
Provinces
- ID:
id,identifier - Owner ID:
ownerid,oid,ownersid - Original Owner ID:
originalownerid,ooid,originalownersid - Owner User ID:
owneruserid,ouid,ownerusersid - Owner Country:
ownercountry,oc,ownerc,ownercountryname - Name:
name,n,provname,provincename - Current Resource Production:
currentresourceproduction,crp,rssprodnow,currentrssprod,resourceproductionnow - Maximum Resource Production:
maximumresourceproduction,mrp,rssprodmax,maximumrssprod,resourceproductionmax - Resource Type:
resourcetype,rt,rsstype,resourcetypeid - Building Count:
buildings,b,buildinglist,building - Morale:
morale,m
Countries
- ID:
id,cid,countryid - User ID:
userid,uid,usersid,ownerid - Name:
name,n,countryname,cname - Username:
username,uname,user - Capital:
capital,cap,capitalname,capitalcity - Capital ID:
capitalid,capid,capitalprovinceid - Province Count:
provcount,pc,provincecount,provs - Bot:
bot,b,isbot,botuser - AFK:
afk,a,isafk,awayfromkeyboard - Banned:
banned,ban,isbanned,isban - Defeated:
defeated,d,isdefeated,defeatedcountry - Premium:
premium,p,ispremium,premiumuser - Coalition Name:
coaname,coa,coalitionname,coalition - Coalition ID:
coaid,coalitionid
Coalitions
- ID:
id,cid,coalitionid - Name:
name,n - Leader ID:
leaderid,lid - Leader Name:
leadername,ln - Leader Country:
leadercountry,lc - Disbanded:
disbanded,d,isdisbanded,disbandedcoalition
Market
- ID:
id,offerid - Type:
type,t,offerstype - Resource Type:
resourcetype,rt,rsstype - Price:
price,p,offerprice - Amount:
amount,a,offeramount - Owner ID:
ownerid,oid - Owner Name:
ownername,oname - Owner Country:
ownercountry,oc
Examples
Basic Province Data
/excel sup
gameid: 10158551
params: provinces-name;morale;ownercountry
Here's the excel with the data you requested:
| Name | Morale | Owner Country |
|---|---|---|
| Waterford | 93 | Leinster |
| Cork | 95 | Leinster |
| Tralee | 94 | Western Iceland |
| Limerick | 96 | Western Iceland |
Basic Province Data from X Country and Sorted by Ascending Morale
/excel sup
gameid: 10158551
params: provinces-name;morale;ownercountry-ownercountry+=+"Leinster"-morale+asc
Here's the excel with the data you requested:
| Name | Morale | Owner Country |
|---|---|---|
| Lübeck | 52 | Leinster |
| Schwerin | 58 | Leinster |
| Port Mulgrave | 68 | Leinster |
| Halifax | 69 | Leinster |
| New Germany | 71 | Leinster |
| Baddeck | 71 | Leinster |
| Castor's Harbor | 74 | Leinster |
| Groningen | 81 | Leinster |
Combination of Multiple Spreadsheets
/excel sup
gameid: 10158551
params: provinces-id;name;morale;ownercountry;;countries-name;username;provcount
Here's the excel with the data you requested:
provinces:
| ID | Name | Morale | Owner Country |
|---|---|---|---|
| 0 | Waterford | 93 | Leinster |
| 1 | Cork | 95 | Leinster |
| 2 | Tralee | 94 | Leinster |
| 3 | Limerick | 96 | Leinster |
countries:
| Name | Username | Province Count |
|---|---|---|
| Munster | FAKE USER 1 | 43 |
| Leinster | MarcZX10 | 2546 |
| Connaught | JaimyLuk7 | 3 |
| Ulster | TheJavi302 | 0 |
Market with Multiple Filters and Sorters
/excel sup
gameid: 10158551
params: market-type;ownercountry;resourcetype;price;amount-type+=+"ask";price+<+20-resourcetype+asc;price+asc
Here's the excel with the data you requested:
| Type | Owner Country | Resource Type | Price | Amount |
|---|---|---|---|---|
| ask | Perm | Coal | 18,3 | 3500 |
| ask | Midway | Fish | 11,2 | 922 |
| ask | Fiji & Tonga | Fish | 12,9 | 2774 |
| ask | Vilna | Fish | 14,5 | 526 |
| ask | Winnipeg | Fish | 15,5 | 2172 |
| ask | Western Iceland | Fish | 19 | 6227 |
| ask | Kuopio | Gas | 18,9 | 1558 |
| ask | East Sar Darya | Gas | 19 | 12349 |
| ask | East Prussia | Grain | 13,2 | 4736 |
| ask | Winnipeg | Grain | 13,4 | 2000 |
| ask | West Arkhangelsk | Grain | 14 | 9240 |
| ask | West Arkhangelsk | Grain | 16,4 | 248 |
| ask | Kola | Iron ore | 16,8 | 2189 |
Provinces with the "in" Filter
/excel sup
gameid: 10158551
params: provinces-name;ownercountry;morale;resourcetype-ownercountry+in+"spain","france";resourcetype+in+"grain","fish"
Here's the excel with the data you requested:
| Name | Owner Country | Morale | Resource Type |
|---|---|---|---|
| Paris | France | 100 | Grain |
| Marseilles | France | 100 | Fish |
| Bordeaux | France | 100 | Grain |
| Reims | France | 100 | Grain |
| Limoges | France | 100 | Grain |
| Brest | France | 100 | Fish |
| Palma | Spain | 85 | Fish |
| Madrid | Spain | 100 | Grain |
| Valencia | Spain | 86 | Grain |
| Salamanca | Spain | 90 | Grain |
| Lisbon | Spain | 72 | Grain |
| Lagos | Spain | 75 | Fish |
| Coimbra | Spain | 79 | Fish |
Additional Notes
- Make sure the bot has all permissions required.
- If the bot can't find the bot even though you are sure it exists, it's likely the game is taking too long to reply or, alternatively, the bot is broken. If so, get in contact with the dev in the Discord server
- There's a character limit of 2000 for the parameters. If you surpass that, you might be crazy. Take a look at the documentation and use shorter synonyms to reduce text length (e.g. use
lcinstead ofleadercountry). - Any further questions can be answered in the Official Server.