Skip to content

Using Excel to Edit Data Tables

John edited this page Jul 20, 2021 · 1 revision

SWG Source has developed a macro for excel (Excel 2013 or later) which will properly export an excel sheet into .tab format for use as a Data Table in SWG. Please follow the instructions below to use the macro.

Setup Instructions

Before proceeding, you will need to enable the Excel Developer Tab, which you can find instructions for from Microsoft here.

Next, download the download the Data Table Macro from the SWG Source Repository and place it somewhere you'll remember. If you are having trouble downloading the file, copy of the code from the raw view and save it in notepad as a bas file.

So we can always access this macro no matter what file we're in, we need to create the Personal Macro Workbook, which is an internal feature to Excel. To do this, simply go to the Developer tab in the ribbon of Excel and then select Record Macro. Press OK. Then press Stop Recording. No need to worry about additional steps.

Now inside Excel, press Alt + F11. You will see the VBA Editor. In the tree of files on the left, find VBAProject (PERSONAL.XLSB) and right-click it, then select Import and select the SwgExcelDataTableExport.bas file. This macro will now be accessible no matter what Excel file you're in.

To access this macro quickly, we'll also add it to the Ribbon. Left-click anywhere on the ribbon and select Customize the Ribbon.... Under the Chose commands from: dropdown, select Macros find PERSONAL.XLSB!DataTableExport and select it. On the Tabs tree, select the Developer tab then click the New Group button and add a group called Macros (or whatever you want). Then select the new group you made, and click the middle Add >> button which will put the Macro button into your Macro group. Finally, click OK. When you visit the Developer tab, you should now see a button for your Data Table export, which will appear across all of Excel.

Usage Instructions

With the macro installed, open any .tab file in excel and edit whatever you need to. You may find it helpful for visually filtering and rendering the data in a helpful way while you are making edits to select Insert > Table with My Table has headers checked. Then click OK. This will help Excel present and filter the data in ways that may be helpful while making edits.

When you're ready to save the file, click your Data Table Export macro button, and enter the file name. NOTE you can't enter the name of the file you are currently editing, so if you are editing skills.tab then call the file skill.tab instead. Be sure to include the .tab extension. Once you export, then just close Excel, delete the existing skills.tab you had open in Excel, and rename the newly exported file you made, skill.tab to skills.tab as the replacement with the correct edits.

Clone this wiki locally