io

Input/Output in external formats.

Select category:

File I/O

append_save
append_save M-file function
fexist
Checks whether a file exists.
rfsearch
Recursively search for file or filename pattern FNAME starting in directory DNAME and return the first match.

Miscellaneous conversion functions

fromJSON
Convert a JSON string into a native Octave object.
object2json
Returns a valid JSON string that will describe object; the string will be in a compact form (no spaces or line breaks).
pch2mat
Converts NASTRAN PCH file (SORT2) to a data structure and frequency vector.
read_namelist
S = READ_NAMELIST (FILENAME) returns the struct S containing namelists and variables in the file FILENAME organised in hierachical way:
toJSON
Convert any Octave OBJ into a compact JSON string.
utf82unicode
Convert from UTF-8 encoded strings ISTR to Unicode codepoints USTR.
unicode2utf8
Convert from Unicode code points USTR to UTF-8 encoded string OSTR.
write_namelist
WRITE_NAMELIST(S, FILENAME) writes a namelist data structure S to a file FILENAME.

CSV file functions

cell2csv
Create a CSV file from a cell array.
csv2cell
Read a CSV (Comma Separated Values) file and convert it into a cell array.
csvconcat
Concatenate a cell into a CSV string or array of strings.
csvexplode
Explode a CSV string into a cell.

DBF I/O

dbfread
Read contents of a dbase (dbf) file, provisionally dbase III+, IV or V.
dbfwrite
Write data in a cell array to a dbf (xBase) file, provisionally dBase III+.

XML I/O

getxmlattv
Get value of attribute ATT in xml node (char string) XMLNODE, return empty if attribute isn't present.
getxmlnode
Get a string representing the first xml TAG node starting at position IS in xml text string XML, and return start and end indices.
tidyxml
Optionally convert character using the function handle in CONV_FCN, remove characters (<32 >255) from text string or cell array ISTR and return the result in OSTR.
xmlread
Parse an xml file FNAME using Xerces Java library and return a Java object representing an XML DOM document.
xmlwrite
Write an XML DOM document to file FNAME or to output string STR.

Spreadsheet I/O user functions for MS-Excel

oct2xls
Add data in 1D/2D CELL array ARR into a cell range RANGE in worksheet WSH in a spreadsheet file pointed to in structure XLS.
xls2oct
Read data contained within cell range RANGE from worksheet WSH in a spreadsheet file pointed to in struct XLS.
xlsclose
Close a spreadsheet file pointed to in struct XLS, and if needed write file to disk.
xlsfinfo
Query a spreadsheet file for some info about its contents.
xlsopen
Get a pointer to a spreadsheet in memory in the form of return argument (file pointer struct) XLS.
xlsread
Read data from a spreadsheet file.
xlswrite
Add data in 1D/2D array ARR to a spreadsheet file.

Spreadsheet I/O user functions for OpenOffice.org Calc

oct2ods
Transfer data to spreadsheet file pointer ODS.
ods2oct
Read data from a spreadsheet file pointed to in file pointer struct ODS.
odsclose
Close a spreadsheet file pointer and if needed write the contents to disk.
odsfinfo
Query a spreadsheet file for some info about its contents.
odsopen
Get a pointer to contents of a spreadsheet file.
odsread
Read data from a spreadsheet file.
odswrite
Write data to a spreadsheet file.

Spreadsheet utility functions

calccelladdress
calccelladdress (R, C) - compute spreadsheet style cell address from row & column index (both 1-based).
chk_spreadsheet_support
Check Octave environment for spreadsheet I/O support, report any problems, and optionally add or remove Java class libs for spreadsheet support.
parsecell
Divide a heterogeneous 2D cell array into a 2D numeric array and a 2D cell array containing only strings.

Spreadsheet function test scripts

io_testscript
Try to check proper operation of spreadsheet I/O scripts using interface INTF1.
test_spsh
Test functionality of supported spreadsheet interfaces.

Package: io