cointracking-imports- Generate CSV & XLSX files for importing into CoinTracking.
Safe HaskellNone



Generate CSV & XLSX files to use with CoinTracking's import feature.



writeImportDataToFile :: FilePath -> [CTImportData] -> IO () Source #

Write the given data to a file. If the file extension is .xlsx or .xls, we write a spreadsheet. Otherwise we write a CSV.


CSV Import Files

coinTrackingCsvImport :: [CTImportData] -> ByteString Source #

Generate the CoinTracking CSV Import for the data, prepended by a header row.

Note: the resulting ByteString has it's final newline removed, as CoinTracking's Import creates a double entry with newlines at the end of an import file.

headerRow :: ByteString Source #

The CSV header row to prepend to the generated output.

csvEncodingOptions :: EncodeOptions Source #

defaultEncodeOptions, but with newline-only line endings.

XLSX Import Files

coinTrackingXlsxImport Source #


:: POSIXTime

Creation time to embed in the spreadsheet.

-> [CTImportData] 
-> ByteString 

Generate an XLSX file containing the expected headers rows and the import data.

writeXlsxHeader :: Worksheet -> Worksheet Source #

Write the standard CoinTracking header to the first two rows of the worksheet.

writeXlsxRow :: Worksheet -> Int -> CTImportData -> Worksheet Source #

Write a CTImportData to the given row(1-indexed) of the worksheet.