Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Exactly one of O_RDONLY or O_RDWR must be specified. O_RDONLY int = syscall.O_RDONLY // open the sheet read-only. O_RDWR int = syscall.O_RDWR // open the sheet read-write. // The remaining values may be or'ed in to control behavior. O_CREATE int = syscall.O_CREAT // create a new sheet if none exists. O_EXCL int = syscall.O_EXCL // used with O_CREATE, sheet must not exist. O_TRUNC int = syscall.O_TRUNC // truncate regular writable sheet when opened. )
Variables ¶
Functions ¶
Types ¶
type Sheet ¶
type Sheet struct { io.ReadWriter // contains filtered or unexported fields }
func OpenSheet ¶
func OpenSheet(ctx context.Context, spreadSheetId string, sheetName string, flag int, clientCredentialsJson []byte) (*Sheet, error)
OpenSheet is the generalized open call. It opens the sheet with specified flag (O_RDONLY etc.). If the sheet does not exist, and the O_CREATE flag is passed, it is created. If successful, methods on the returned Sheet can be used for csv I/O.
Can also be used to check if a given file exists. To do so analysis the returned error like so errors.Is(err, gs.ErrExist).
func (*Sheet) SpreadSheetId ¶
Returns the spreadsheet ID
Click to show internal directories.
Click to hide internal directories.