fxExcel — Excel-Compatible Functions¶
Functions with names and behaviors identical to Microsoft Excel, making the transition from spreadsheets to Python seamless.
Submodules¶
| Submodule | Purpose |
|---|---|
database_formulas |
DSUM, DAVERAGE, DCOUNT, etc. |
date_formulas |
DATE, YEAR, MONTH, DAY, NOW, etc. |
engineering_formulas |
BIN2DEC, HEX2OCT, CONVERT, etc. |
financial_formulas |
PMT, FV, PV, NPV, IRR, etc. |
information_formulas |
ISNUMBER, ISTEXT, ISERROR, TYPE, etc. |
logic_formulas |
IF, AND, OR, NOT, IFS, SWITCH, etc. |
lookup_formulas |
VLOOKUP, HLOOKUP, INDEX, MATCH, etc. |
math_formulas |
SUM, SUMIF, ROUND, ABS, MOD, etc. |
statistic_formulas |
AVERAGE, MEDIAN, STDEV, COUNT, etc. |
text_formulas |
CONCATENATE, LEFT, RIGHT, MID, TRIM, etc. |
Quick Examples¶
from shortfx import fxExcel
# VLOOKUP
table = [
["Name", "Age", "City"],
["Ana", 25, "Madrid"],
["Juan", 30, "Barcelona"],
]
age = fxExcel.VLOOKUP("Ana", table, 2) # 25
# Text functions
greeting = fxExcel.CONCATENATE("Hello", " ", "World") # "Hello World"
# Math
total = fxExcel.SUMIF([10, 20, 30, 40], ">15") # 90
# Logic
result = fxExcel.IF(True, "Yes", "No") # "Yes"
Note
All function names use UPPERCASE to match Excel conventions (e.g., VLOOKUP, not vlookup).