Table of Contents
This Add-In is used for cleaning & creating a script for batch loading records into SQL Server, Oracle, Documentum, Markup or Markdown Languages. The functionality within the ribbon allows a quick way of preparing a bulk data load. Otherwise, the requests can be both time-consuming and error prone. It is written in 3 different versions as a VSTO Add-In in C# and VB.NET as well as a VBA Add-In. The most complete version is C#.
Instructions for installation of VBA and VSTO versions.
How to install the VBA version
- Download the VBA Add-In file .
- Copy the file to the XLSTART folder on your computer.
%AppData%\Microsoft\Excel\XLSTART\
- Close all open instances of Excel and then launch Excel. The new ribbon should appear.
How to install the VSTO version
Software | Dependency | Project |
---|---|---|
Microsoft Visual Studio | Solution | VSTO |
Microsoft Office Developer Tools | Solution | VSTO |
Microsoft Excel | Project | VBA, VSTO |
Visual Basic for Applications | Code | VBA |
Extensible Markup Language (XML) | Ribbon | VBA, VSTO |
Microsoft SQL Server CE 3.5 | Database | VSTO |
SQL Server Compact Toolbox | Database | VSTO |
Log4Net | Error Logging | VSTO |
ScreenToGif | Read Me | VBA, VSTO |
Snagit | Read Me | VBA, VSTO |
Badges (Library, Custom, Star/Fork) | Read Me | VBA, VSTO |
Term | Meaning |
---|---|
COM | Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in 1993. It is used to enable inter-process communication and dynamic object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, ActiveX, COM+, DCOM, the Windows shell, DirectX, UMDF and Windows Runtime. |
DQL | DQL is used to query Documentum which is a content management system used to create, manage, deliver, and archive all types of content from text documents and spreadsheets to digital images, HTML, and XML components. DQL uses syntax that is a superset of ANSI-standard SQL (Structured Query Language) DQL statements operate on objects and sometimes on tables/rows but SQL statements operate only on tables/rows |
HTML | Hypertext Markup Language is the standard markup language for creating web pages and web applications |
PL/SQL | PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension for SQL and the Oracle relational database |
T-SQL | Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to SQL. SQL, the acronym for Structured Query Language |
UNION | The SQL UNION operator combines the result of two or more SELECT statements. |
VBA | Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6 and uses the Visual Basic Runtime Library. However, VBA code normally can only run within a host application, rather than as a standalone program. VBA can, however, control one application from another using OLE Automation. VBA can use, but not create, ActiveX/COM DLLs, and later versions add support for class modules. |
VSTO | Visual Studio Tools for Office (VSTO) is a set of development tools available in the form of a Visual Studio add-in (project templates) and a runtime that allows Microsoft Office 2003 and later versions of Office applications to host the .NET Framework Common Language Runtime (CLR) to expose their functionality via .NET. |
XML | Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.The design goals of XML emphasize simplicity, generality, and usability across the Internet. It is a textual data format with strong support via Unicode for different human languages. Although the design of XML focuses on documents, the language is widely used for the representation of arbitrary data structures such as those used in web services. |
This Excel ribbon is inserted after the “Home” tab when Excel opens. Listed below is the detailed functionality of this application and its components.
This custom context menu is only available inside an Excel table. shortcut menu
A KeyTip must be from 1 to 3 uppercase characters, and must not contain spaces, tabs, or newline characters. KeyTips are sometimes known as access keys or accelerators and are used as shortcut key combinations that activate controls. KeyTips appear on the Ribbon when you press the ALT key. If your KeyTip conflicts with KeyTips for built-in controls or from other add-ins, Microsoft Office might assign non-conflicting KeyTip values automatically. This is available in the VBA version only.
- Paste the contents of the clipboard
- Copies the selection on to the clipboard so you can paste it somewhere else
Copy Visible (Button)
- Copies only the visible cells from a selection
These buttons have the following constraints:
- Only runs on visible columns. Column hiding can be used to control which columns are included in the script formula.
- Attempt to automatically determine data type of column (text, numeric, date) in order to apply correct quoting and formatting.
- For numeric columns if a specific number format has been applied to the entire column then this will be used when formatting the data. This can be used to control the specific data load format of a numeric column if needed.
- Quickly format a range of cells and convert it to a Table by choosing a Table Style.
- Keep a portion of the sheet visible while the rest of the sheet scrolls
- Delete duplicate rows from a sheet
Separate Values (Button)
- Separate values into new rows from the selected column by a delimited string value setting
Clean Data (Button)
- This feature runs through all the data in the table and removes unprintable characters and trims leading and trailing spaces.
- The number of cells cleaned is shown in a message box and cleaned cells are highlighted.
Convert to Null (Button)
- Replaces the zero string values in a named range with “NULL” text value.
Clear Interior Color (Button)
- Clears the interior color of cells in a named range or data table.
Table Alias (Dropdown)
- Changes the prefix to the header and footer line script column
- These values can be updated using the build button “…” to the right of the dropdown
Format Date (Button)
- This feature applies the selected format from the dropdown e.g. "dd-mmm-yyyy" to all date columns it detects in the active table. If there are zero strings in the column instead of “NULL”s, then the column is treated as a string.
- When data is cut and pasted from SSMS into Excel, for whatever reason, Excel chooses to format the dates with the (useless) format "mm:ss.0". This seems to be impossible to configure.
Format Date (Dropdown)
- This is the format the script looks for to finds dates
- These values can be updated using the build button “…” to the right of the “Date Format” dropdown
Format Time (Button)
- This feature applies the selected format from the dropdown e.g. "hh:mm" to selected column from the active cell.
Format Time (Dropdown)
- This is the date format the script uses to replace the formatting for date columns.
- It defaults to ‘dd-mmm-yyyy’, and can be changed by the dropdown value or free text
- These values can be updated using the build button “…” to the right of the dropdown
Add Script Formula (Menu Buttons) ribbon menu
T-SQL (Transact-Structured Query Language)
- T-SQL Create Table - This menu item will format the script column to drop/create the table then insert the values
- T-SQL Insert Values – This menu item will format the script column to use individual insert statements
- T-SQL Merge Values – This menu item will format the script column to use a merge statement with a select values
- T-SQL Select Values – This menu item will format the script column to be used in insert statements
- T-SQL Select Union – This menu item will format the script column to be used in an update statement
- T-SQL Update Values – This menu item will format the script column to use individual update statements
PL/SQL (Procedural Language/Structured Query Language)
- PL/SQL Create Table - This menu item will format the script column to drop/create the table then insert the values
- PL/SQL Insert Values – This menu item will format the script column to use individual insert statements
- PL/SQL Merge Values - This menu item will format the script column to use a merge statement with a select values
- PL/SQL Select Values - This menu item will format the script column to be used in insert statements
- PL/SQL Select Union – This menu item will format the script column to be used in an update statement
- PL/SQL Update Values – This menu item will format the script column to use individual update statements
DQL (Documentum Query Language)
- DQL Append – This menu item will format the script column to be used in an append statement for Documentum (this is used for repeating values)
- DQL Append/Locked – This menu item will format the script column to be used in an append statement for Documentum (this is used for repeating values) and unlocks and then locks the record.
- The table must contain a column header with 'WHERE'.
- Add “WHERE” before the column name in the header you want to use as criteria.
- DQL Create – This menu item will format the script column to be used in an create statement for Documentum
- DQL Truncate/Append – This menu item will format the script column to be used in an truncate and then append statement for Documentum (this is used for repeating values).
- The table must contain a column header with 'WHERE'.
- Add “WHERE” before the column name in the header you want to use as criteria.
- DQL Update – This menu item will format the script column to be used in an update statement for Documentum
- DQL Update/Locked – This menu item will format the script column to be used in an update statement for Documentum and unlocks and then locks the record.
- The table must contain a column header with 'WHERE'.
- Add “WHERE” before the column name in the header you want to use as criteria.
- Markdown table - creates a table format for Markdown Read Me documentation (e.g. GitHub)
- HTML Table - creates a HTML table structure
- XML Values - creates XML structure
- The camera tool allows you to take a snapshot of any selected range of data, table, or graph, and paste it as a linked picture. The pasted snapshot can be formatted and resized using picture tools. They can be copied and pasted into Word and PowerPoint documents as well. The image is automatically refreshed if the data changes.
- Capture all or part of your PC screen, add notes, save the snip, or email it from the Snipping Tool window. You can capture any of the following types of snips:
- Free-form snip. Draw a free-form shape around an object.
- Rectangular snip. Drag the cursor around an object to form a rectangle.
- Window snip. Select a window, such as a browser window or dialog box, that you want to capture.
- Full-screen snip. Capture the entire screen.
- Steps Recorder (called Problems Steps Recorder in Windows 7), is a program that helps you troubleshoot a problem on your device by recording the exact steps you took when the problem occurred. You can then send this record to a support professional to help them diagnose the problem.
- Opens a webpage of the read me documentation
- Opens a page to create a new issue for the product
- Types of VSTO Settings
- Application Settings
- These settings can only be changed in the project and need to be redeployed
- They will appear disabled in the form
- User Settings
- These settings can be changed by the end-user
- They will appear enabled in the form
- Application Settings
- VBA Settings
- To add a new setting
ThisWorkbook.CustomDocumentProperties.Add _ Name:="App_ReleaseDate" _ , LinkToContent:=False _ , Type:=msoPropertyTypeDate _ , Value:="31-Jul-2017 1:05pm"
- To update a setting
ThisWorkbook.CustomDocumentProperties.Item("App_ReleaseDate").Value = "31-Jul-2017 1:05pm"
- To delete a setting
ThisWorkbook.CustomDocumentProperties.Item("App_ReleaseDate").Delete
- To add a new setting
- The release date of the application
- The author’s name