Teradata/jaqy

Add Excel importer / exporter

Closed this issue · 0 comments

While CSV is nice, having the ability to directly export data to excel spreadsheet can be an useful feature.

Export

Basically, a ResultSet is saved as a worksheet in an Excel file.

Things to consider:

  1. Add formatting for numbers, date, time and timestamps.
  2. Potentially do automatic width adjustment.
  3. Add freeze pane for column names. Adding primary index if the first columns are primary indexes would be more difficult because such information is generally not available from queries. However such info is available for table export.
  4. Use table name as sheet name (difficult to figure out). Or let user specify it.
  5. Switch row / column for export.
  6. Add multiple sheet support? This is unlikely
  7. There is a row limit for Excel. What to do at the limit? The simplest solution is stopping at the limit.
  8. Anyways to save the query itself somewhere in the spreadsheet?

Import

Things to consider

  1. Skip over freeze panes. Add the check for first row as potential column names.
  2. Potentially infer database data types from cell formats etc.
  3. Let user to pick the worksheet to import from.
  4. Either let user specify the table name, or infer the table name from sheet name.
  5. Switch row / column for import.

Library to use

Need to evaluate the following two libraries