-
-
Notifications
You must be signed in to change notification settings - Fork 39
Datasource Spreadsheet
The Local: Spreadsheet data source reads an .xlsx, .ods, or .xls file stored in Nextcloud Files. It is source ID 7 and is useful when a spreadsheet is the maintained source of truth for a report.
Analytics reads the selected cells whenever the report is opened. To retain historical snapshots or refresh an Internal Database dataset on a schedule, use the same source in a data load.
The first row of the selected range is the column header. Every later, non-empty row is a record. The final column is the numeric value; all preceding columns are dimensions.
For example, this range is ready to use:
| Month | Category | Amount |
|---|---|---|
| 2026-01 | Hosting | 32.95 |
| 2026-01 | Software | 18.00 |
| 2026-02 | Hosting | 32.95 |
Here, Month and Category are dimensions and Amount is the value. Avoid a completely empty column in the selected data. Analytics removes such columns before it determines the headers and value column.
- Upload the workbook to your Nextcloud Files.
- Choose Local: Spreadsheet when creating a real-time datasource or a data load.
- Select the file in File.
- Enter the worksheet name in Sheet. Leave it empty to use the workbook's active sheet.
- Enter the Cell range, including the header row, for example
A1:C4for the table above. - Use the datasource test or the data load's Test run before saving or scheduling it.
The File field accepts text variables. For a daily data load, for example, keep the selected path and use a filename such as report_%today%(Y-m-d).xlsx; the variable is resolved when the load runs. The resulting file must exist in the dataset owner's Nextcloud Files.
For a workbook at /Finance/Expenses.ods, with the example table on a sheet named Expenses, use:
| Setting | Value |
|---|---|
| File | /Finance/Expenses.ods |
| Sheet | Expenses |
| Cell range | A1:C4 |
The report can then use Month and Category as its dimensions and Amount as its value.
Suppose a sheet contains internal notes in columns B and D, while the reporting fields are in A, C, and E:
| A | B | C | D | E |
|---|---|---|---|---|
| Date | Notes | Region | Internal comment | Revenue |
| 2026-01-01 | ... | North | ... | 1200 |
| 2026-01-02 | ... | South | ... | 980 |
Enter A1:A3,C1:C3,E1:E3 as the Cell range. Analytics joins the ranges horizontally, producing Date, Region, and Revenue without importing the note columns. Every joined range must cover the same rows and include its header row.
Formula cells are read as their calculated values. Percentages are read as decimals, so a cell displayed as 14% becomes 0.14. Spreadsheet date cells are read using their cell number format, so format date values consistently in the workbook before using them as report dimensions.
For predictable results, do not use merged cells in the header row. In data rows, Analytics uses the upper-left value of a merged cell.
Use A1-style ranges such as A1:C100, or a comma-separated list of ranges such as A1:A100,C1:C100,E1:E100. A single cell such as B2 is also valid, although it cannot form a useful Analytics data table by itself.
Ranges must have positive row numbers and must not exceed 10,000 rows each or 100,000 cells in total. Narrow the range to the actual table instead of selecting complete columns or a whole worksheet. If Analytics reports an invalid or oversized range, check the spelling, remove blank ranges, and select only the populated rows and columns.
Analytics tracks the file's modification time, so replacing or saving the workbook in Nextcloud makes the next read use the new content. If a scheduled data load should completely replace stored rows, enable Delete data before load only after a successful Test run; that deletion cannot be undone by Analytics.
For general source selection and source IDs, see the Data source reference. For data-load failures, see Data-load troubleshooting.