{"text_format":"1","workbook":"xlsx","n_sheets":2,"sheets":["Instructions","TEMPLATE"],"not_rendered":{"charts":0,"images":0,"macros":1,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Instructions","index":0,"n_rows":42,"n_cols":13,"rows_kept":42,"cut":false,"hidden":false,"merged":[[26,2,26,14],[27,2,28,14],[29,2,29,14],[30,2,32,14],[19,2,20,14],[22,2,23,14],[21,2,21,14],[24,2,24,14],[25,2,25,14],[9,2,11,14],[12,2,13,14],[17,2,18,14],[3,2,6,14],[14,2,16,14]]}
[null,null,null,null,null,null,null,null,null,null,null,null,"AddTable"]
[]
[null,null,"Overview"]
[null,null,"This file is designed to speed up the creation of MySQL Tables and Fields when they are created.  As good as phpMyAdmin and other tools are to accomplish this task, forms within websites are not quite as easy to navigate as MS Excel.  Therefore, when creating a new table with several fields, or several tables, in a short period of time, use this file.  You'll also have a backup of your database structure, in case you ever need to share it or use it again."]
[]
[]
[]
[]
[null,null,"Instructions"]
[null,1,"In the TEMPLATE sheet, fill in your database name so that it can be used as the default for all new tables.  This can always be changed if you use multiple databases.  After you add your first table, the TEMPLATE sheet will be hidden so that it is not accidentally updated.  You can always unhide it if you need to update the default database."]
[]
[]
[null,{"$f":"B10+1","v":2},"Click the AddTable link above/right in this sheet or any other sheet in the file.  It will create a blank listing for all the fields to add in a new table."]
[]
[null,{"$f":"+B13+1","v":3},"Enter the new table's name and estimated number of fields when prompted.  The number of fields is only used to help fill in the formulas if you need a large number of fields.  You can always add more fields later on and fill the formulas in manually.  After you enter the name and number of fields, a sheet will be added for that table."]
[]
[]
[null,{"$f":"+B15+1","v":4},"Fill in the NAME of each field to be used.  It is assumed that you'll want a surrogate key named \"id\" as your auto-incrementing primary key, but you can change this to any name you want."]
[]
[null,{"$f":"+B18+1","v":5},"Select the TYPE of each field to be used.  Note that you can start typing and Excel will try to auto-fill for you to speed up your entry.  Note that if you pick a field type that doesn't require a LENGTH, it must have a space at the end (data validation should help with this)."]
[]
[null,{"$f":"+B20+1","v":6},"Select the LENGTH of each field that requires it."]
[null,{"$f":"+B22+1","v":7},"Select whether numeric fields should be UNSIGNED.  Note that by default if the TYPE is an integer type, by default it fills in as unsigned.  Just erase the cell contents if you do need the number to be able to be signed."]
[]
[null,{"$f":"+B23+1","v":8},"If you want to allow NULL values, erase the cell contents in the NULL column for the field."]
[null,{"$f":"+B25+1","v":9},"If you would like to include another field to be auto-incremented, select that option in the AI column."]
[null,{"$f":"+B26+1","v":10},"If you would like to use a different field as a primary key, select that option in the PK column."]
[null,{"$f":"+B27+1","v":11},"If you add the field as you create the table, ensure that \"C\" is selected in the C / A column.  If adding after the tale is already created, select the \"A\" option."]
[]
[null,{"$f":"+B28+1","v":12},"Once you are done, select \"y\" in the Done column so that you'll know which fields you've already created."]
[null,{"$f":"+B30+1","v":13},"Once you've entered all the info you need for each field, the formulas off to the right should contain the SQL syntax you need to add or update your table.  Copy and paste the cells that you need into a SQL command line within phpMyAdmin and your command should process quickly and easily."]
[]
[]
[]
[]
[]
[]
[]
[]
[null,null,"Template Notes"]
[null,null,"Copyright Excelevate Consulting, LLC 2018."]
[null,null,"This file is free to distribute, modify, or use.  Any attempt to resale without express written consent is strictly prohibited."]

{"sheet":"TEMPLATE","index":1,"n_rows":26,"n_cols":30,"rows_kept":26,"cut":false,"hidden":false,"merged":[[4,15,4,17],[4,18,4,20],[4,23,4,30],[3,3,3,12]]}
[null,"DB name:",null,"YOUR_DATABASE_NAME",null,null,null,"AddTable"]
[null,"Tablename:"]
[null,"# Fields:"]
[null,"Comment:",null,null,null,null,null,null,null,null,null,null,null,{"$f":"IF(D4=\"\",\"\",\" COMMENT '\"&D4&\"'\")","v":""}]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"CREATE",null,null,"ADD",null,null,null,null,"DATA OPTIONS"]
[null,"Name","Type","Length","Unsigned?","Null?","AI?","PK?","Default","Comment","C / A","Done","END","LEN",null,"SQL:",{"$f":"\"CREATE TABLE `\"&D1&\"`.`\"&D2&\"` (\"","v":"CREATE TABLE `YOUR_DATABASE_NAME`.`` ("},null,"SQL:",{"$f":"\"ALTER TABLE `\"&D2&\"` \"","v":"ALTER TABLE `` "},null,null,null,"Type","Unsigned?","Null?","AI?","PK?","C / A","Done"]
[1,"id","INT",17,{"$f":"IF(RIGHT(C7,3)=\"INT\",\"UNSIGNED \",\"\")","v":"UNSIGNED "},{"$f":"IF(B7=\"\",\"\",\"NOT NULL \")","v":"NOT NULL "},"AUTO_INCREMENT ","PRIMARY KEY ",{"$f":"IF(H7=\"PRIMARY KEY \",\"\",IF(OR(C7=\"INT\",C7=\"TINYINT\",C7=\"SMALLINT\",C7=\"FLOAT\"),0,IF(C7=\"DATE \",\"0000-00-00\",\"\")))","v":""},null,null,null,{"$f":"IF(B7=\"\",\"\",IF(B8<>\"\",\",\",IF(K7=\"A\",\"\",$N$4&\");\")))","v":");"},{"$f":"IF(D7<>\"\",\"(\"&D7&\") \",\"\")","v":"(17) "},null,null,{"$f":"IF(OR(B7=\"\",K7=\"A\"),\"\",\"`\"&B7&\"` \"&C7&N7&E7&F7&IF(I7<>\"\",\"DEFAULT '\"&I7&\"' \",\"\")&G7&H7&IF(J7<>\"\",\"COMMENT '\"&J7&\"'\",\"\")&M7)","v":"`id` INT(17) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY );"},null,null,{"$f":"IF(AND(B7<>\"\",K7=\"A\"),\"ADD `\"&B7&\"` \"&C7&N7&E7&F7&\"DEFAULT '\"&I7&\"' \"&G7&H7&IF(J7<>\"\",\"COMMENT '\"&J7&\"'\",\"\")&M7,\"\")","v":""},null,null,null,"VARCHAR","UNSIGNED ","NOT NULL ","AUTO_INCREMENT ","PRIMARY KEY ","C"]
[{"$f":"+A7+1","v":2},null,null,null,{"$f":"IF(RIGHT(C8,3)=\"INT\",\"UNSIGNED \",\"\")","v":""},{"$f":"IF(B8=\"\",\"\",\"NOT NULL \")","v":""},null,null,{"$f":"IF(H8=\"PRIMARY KEY \",\"\",IF(OR(C8=\"INT\",C8=\"TINYINT\",C8=\"SMALLINT\",C8=\"FLOAT\"),0,IF(C8=\"DATE \",\"0000-00-00\",\"\")))","v":""},null,null,null,{"$f":"IF(B8=\"\",\"\",IF(B9<>\"\",\",\",IF(K8=\"A\",\"\",\");\")))","v":""},{"$f":"IF(D8<>\"\",\"(\"&D8&\") \",\"\")","v":""},null,null,{"$f":"IF(OR(B8=\"\",K8=\"A\"),\"\",\"`\"&B8&\"` \"&C8&N8&E8&F8&IF(I8<>\"\",\"DEFAULT '\"&I8&\"' \",\"\")&G8&H8&IF(J8<>\"\",\"COMMENT '\"&J8&\"'\",\"\")&M8)","v":""},null,null,{"$f":"IF(AND(B8<>\"\",K8=\"A\"),\"ADD `\"&B8&\"` \"&C8&N8&E8&F8&\"DEFAULT '\"&I8&\"' \"&G8&H8&IF(J8<>\"\",\"COMMENT '\"&J8&\"'\",\"\")&M8,\"\")","v":""},null,null,null,"CHAR",null,"NULL ",null,null,"A","y"]
[{"$f":"+A8+1","v":3},null,null,null,"","",null,null,"",null,null,null,{"$f":"IF(B9=\"\",\"\",IF(B10<>\"\",\",\",IF(K9=\"A\",\"\",\");\")))","v":""},"",null,null,"",null,null,"",null,null,null,"INT"]
[4,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,"",null,null,null,"TINYINT"]
[5,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,"",null,null,null,"SMALLINT"]
[6,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,"",null,null,null,"DATE "]
[7,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,"",null,null,null,"TEXT "]
[8,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,"",null,null,null,"FLOAT"]
[9,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[10,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[11,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[12,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[13,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[14,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[15,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[16,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[17,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[18,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[19,null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]
[{"$f":"+A25+1","v":20},null,null,null,"","",null,null,"",null,null,null,"","",null,null,"",null,null,""]