Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Functor for parsing and building spreadsheets

License

NotificationsYou must be signed in to change notification settings

bennn/spreadsheet

Repository files navigation

Functor for working with spreadsheets.Generates spreadsheet functions from a spec for spreadsheet rows.

See theexamples/ directory for sample code.

Overview

  1. Create an instance of theRowSpec module.
  • Define a type for spreadsheet rows, give a string separator like",".
  • Write functions to parse a row from a list of columns, and write a row to columns.
  • Give a title---a list of strings describing each column in a row.
  1. CallSpreadsheet.Make with yourRowSpec.
  2. Use the newly-created module to read a spreadsheet from a file, ormake a new one and add rows to it.

API

Also seespreadsheet.mli

  • add_row : t -> row:RowSpec.t -> t add a row to the spreadsheet, overwriting an existing equal row
  • count_rows : t -> int return the number of rows in the spreadsheet
  • create : unit -> t create an empty spreadsheet
  • read : ?skip_title:bool -> string -> t parse a spreadsheet from a file
  • write : filename:string -> t -> unit write a spreadsheet to a file

Note

Requires OCaml 4.02.0 for theSet.of_list function.

About

Functor for parsing and building spreadsheets

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp