Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Matrix.CSV
Queries text of matrix for CSV export.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Matrix | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "Matrix.CSV"; MatrixRef { ; firstRow; lastRow; firstCol; lastCol; rowSeparator; colSeparator; flags } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
MatrixRef | The matrix reference number. | $matrix | |
firstRow | The index of first row. Default is 0. |
0 | Optional |
lastRow | The index of last row. Default is Matrix.Height-1. |
5 | Optional |
firstCol | The index of first column. Default is 0. |
0 | Optional |
lastCol | The index of last column. Default is Matrix.Width-1. |
6 | Optional |
rowSeparator | The row separator. Default is CR. Can be more than one character. |
Char(13) | Optional |
colSeparator | The column separator. Default is semicolon. Can be more than one character. |
";" | Optional |
flags | Available in MBS FileMaker Plugin 13.0 or newer. Various flags. 1: Pass 1 to put all text values in quotes. 2: Include column names in first row (new in v13.1). |
0 | Optional |
Result
Returns text or error.
Description
Queries text of matrix for CSV export.You can use this method to quickly get all values in a given area as text.
If needed, the plugin puts values in quotes and escape quotes and newlines.
Please use Text.WriteTextFile to write to text file if you need CSV export.
Examples
Show matrix in dialog as CSV:
Show Custom Dialog [ “The Matrix" ; MBS( "Matrix.CSV"; $matrix; 0; 2; 0; 2; Char(13); " " ) ]
See also
- List.CSVSplit
- Matrix.CSVSplit
- Matrix.GetValue
- Matrix.Height
- Matrix.SetColumnNames
- Matrix.Width
- Text.WriteTextFile
- XL.Sheet.ReadCellsAsMatrix
Release notes
- Version 14.3
- Added header row flag for Matrix.CSVSplit to put first row into column names.
- Changed Matrix.CSVSplit to handle CSV with multi line values better.
- Version 13.1
- Added flags parameter to Matrix.Text function and a flag for Matrix.CSV and Matrix.Text to include column names in first row.
- Version 13.0
- Added new flags parameter to FM.SQL.CSV and Matrix.CSV.
- Version 12.4
- Fixed a problem with List.CSVSplit, Matrix.CSVSplit and QuickList.CSVSplit not parsing properly quoted multi line value.
- Version 12.2
- Optimized List.CSVSplit, QuickList.CSVSplit and Matrix.CSVSplit to better handle lonely quotes in quoted strings.
- Version 10.5
- Added Matrix.CSVSplit function.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 13.1pr2
- New in MBS FileMaker Plugin 13.0
- MBS FileMaker Plugin, version 13.0pr5
- Matrix functions for FileMaker
FileMaker Magazin
This function checks for a license.
Created 8th April 2019, last changed 7th June 2024