SelectFromDoc

Project information

  • Category: Desktop Development
  • Project date: 2023
  • Project URL in GitHub: SelectFromDoc

Description

  • Allows to select data from documents or clipboard using SQL language.
  • Documents types supported: Excel, CSV, JSON, Text, XML
  • With the possibility to visualize data in charts.
  • And to export data to: CSV, Excel, JSON, Html, Text, XML.
  • Go to application code samples

Technologies used

  • Python, openpyxl, xlrd, lxml, tkinter, configparser, argparse
  • Pandas, pandasql, matplotlib, numpy

Application screenshots

Main screen

  • select a document (Excel, CSV, JSON, Fixed-Width Text or XML)
  • or copy data to clipboard (must be organized in rows and columns)
  • write a SELECT query ('from doc' is mandatory) or open an existing one
  • "Execute" the query
  • to save the result, "Export" it to a choosen format: CSV, Excel, JSON, Html, Text or XML
  • to visualize a chart from data, display the "chart toolbar" and give:
    • Type of the chart: Area, Bar, Barh, Line, Pie, Scatter
    • x-axis column and y-axis column(s)
    • Title, x-label, y-label, and Legend
  • to get help about SQlite select, click on the button "SQL help".

Bar chart

Horizontal bar chart

Area chart

Line chart

Pie chart

Scatter chart

Application code samples

Modules used (not part of Python):

  • pandas, pandasql
  • openpyxl, xlrd
  • matplotlib.pyplot, numpy
  • tkinter
  • configparser
  • argparse

Code sample: "my_read_excel" function replaces pandas "read_excel" which we cannot make it read a text column in Excel which is like a number as text.

Code sample: "Executer" function runs the query and displays the result.

Code sample: "Exporter" function exports the result to different formats.