Skip to content

This is a simple python script that converts DDL for Oracle SQL to excel headings to make creating datasets in excel faster

License

Notifications You must be signed in to change notification settings

Taha-Firoz/DDL2Excel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Oracle SQL DDL to Excel

This script converts any Oracle SQL DDL commands into Table headings and columns to allow for easy creation of Datasets

Getting Started

You'll need Python3 and OpenPyxl

Prerequisites

You can install OpenPyxl with pip like this

pip install openpyxl --user

Installing

To start of copy your ddl commands into a textfile.

python3 DDL2Excel [Filename.txt] [Outputfile.xlsx]

Replace [Filename.txt] with the included "test.txt" file and [Outputfile.xlsx] with "Outputfile.xlsx" Like so

python3 DDL2Excel text.txt Outputfile.xlsx

If the code runs successfully you should have an Outputfile.xlsx in your directory

Changing Colours of filled blocks

If you wish to change the colour of the filled blocks you can change the values of table_heading and table_columns

table_heading = PatternFill(start_color='FF6AA84F',
                        end_color='FF6AA84F',
                        fill_type='solid')

Add the hexcode of the colour you wish to choose into the start_color and end_color parameters. The first two letters as is and append your 6 digit hexcode to them e.g. Dark Green has a hex code "6AA84F" so we'll set the start_color to

start_color = 'FF' + '6AA84F',
end_color = 'FF' + '6AA84F'

Built With

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GPL V3 License - see the LICENSE.md file for details

About

This is a simple python script that converts DDL for Oracle SQL to excel headings to make creating datasets in excel faster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages