How To Import or Export a Spreadsheet in Data Manager

Exporting spreadsheet steps: 

1. Click the Export Button

2. Add a name and save the Spreadsheet. 

Importing spreadsheet steps:

1. Click the Import button 

2. Select files and click OK 

Note: If the Import Button is grayed out, you either don't have permission, or the database is locked by someone else - I am unable to edit the cost database

Additional database spreadsheet info can be found here - Cost Database Creation Spreadsheet - Lesson 1 of 3

Here are some errors that can prevent the spreadsheet from importing. 

Do NOT remove any of the default tabs from the spreadsheet, it will not Import.

Issue #1A - Line Items tab error

INFO DatabaseManager.DatabasePlugin.SpreadsheetImport.SpreadsheetImporter [(null)] - Extracting Line Items
ERROR DatabaseManager.DatabasePlugin.SpreadsheetImport.SpreadsheetImporter [(null)] - Error parsing the the data for line item 00200.000 Template item

Cause 

This happens when you try to add new WBS Properties and update existing line items at the same time. 

Resolution 

To fix this you have to do this in two steps:

1a. Export a blank spreadsheet template for the database by clicking "Create Blank Spreadsheet"

1b. Next, copy all the "WBS Properties" from the "Main Import spreadsheet" and paste the data in the "Blank Spreadsheet" WBS Properties tab

1c. Save that file and Import the Blank Spreadsheet with just the WBS Properties (IE the WBS properties sheet is filled out, and all other sheets are blank).

2. Next import the Main Import sheet with all the changes. 

Issue #1B - Line Items tab error

Error log message 

ERROR DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter [(null)] - Error exporting Line Item: 00001001 Fence Removal
ERROR DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter [(null)] - Error exporting line items
ERROR DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter [(null)] - Error exporting the database
System.NullReferenceException: Object reference not set to an instance of an object.
   at DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter.WriteLineItems()
   at DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter.<DoAllThatExportStuff>d__8.MoveNext()

Cause 

This might be related to a WBS property not having a Default WBS property value. Check each WBS Property to make sure all the WBS Properties have a Default value

Resolution 

If one of the WBS Properties is missing a default value, follow the steps below. 

1. Click the WBS Property Table view button 

2. Click the ellipsis to open the properties values 

3. Click the Default value 

4. Click the X to close that window and the property window

5. Try importing the spreadsheet again. 

Issue #2 - Markups tab

INFO DatabaseManager.DatabasePlugin.SpreadsheetImport.SpreadsheetImporter [(null)] - Extracting Markups
ERROR DatabaseManager.DatabasePlugin.SpreadsheetImport.SpreadsheetImporter [(null)] - Error importing the database

Cause 

In this scenario, the Markups columns (Escalation, Fringe, Health Insurance, TotalWCIT) were not reading the correct values once you click in some of those cells. If you click in a blank cell and it doesn't show a 0, then that cell is not reading the data correctly and will cause the spreadsheet to not import. 

Resolution 

To get around this issue, follow these steps: 

1. Go to the Resource Groups tab and then click on Resource Group Table View 

2. Click on the Markup/s column and then click Remove Markup - if your markup has values, record the columns that the markup is in so you can re-add it. 

3. Reimport your spreadsheet 

Issue #3 - Import the spreadsheet and receive the error below

Log file:

The problem with this error is that the default spreadsheet sheet tabs shouldn't be removed and the Question tab was removed as well as the Assembly tab. 

Resolution - Add the tab back from Exporting a blank template

Issue #4 - Error Importing Line items 

Error log 

Cause - The unit of measure is showing f'' and in f with two single quotes instead of a double quote f"

Resolution - Either remove the two single quotes and made it a double quote or delete the quote altogether. 

Issue #5 - Error Importing Resource

Log file error:

2023-03-30 08:44:10,788 ERROR DatabaseManager.DatabasePlugin.SpreadsheetImport.SpreadsheetImporter [(null)] - Error extracting the resource on row 9 of the Resource Groups sheet
2023-03-30 08:44:10,788 ERROR DatabaseManager.DatabasePlugin.SpreadsheetImport.SpreadsheetImporter [(null)] - Error importing the database
System.ArgumentException: Column 'Mark UP Name (%)' does not belong to table .
   at System.Data.DataRow.GetDataColumn(String columnName)
   at DatabaseManager.DatabasePlugin.SpreadsheetImport.SpreadsheetImporter.ExtractResources()

Cause: 

There are trailing spaces on the Mark Up Name. 

Resolution:

Click the Populate Resources button, save the file as another version, and then try the Import again.

Export Errors

Issue #1 - Error exporting Assemblies 

Logfile error:

2022-01-04 09:38:07,299 ERROR DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter [(null)] - Error exporting assembly: Interior Wood Stud Partition
System.ArgumentException: An item with the same key has already been added.

Cause 

This error happens because the Assembly Name is unique, therefore if two Assemblies share the same name but different Descriptions, the export will fail. In the example below, I copied assembly 00A General Conditions which append the Description and not the Name. 

Resolution

To fix this, I append the Assembly Name 00A General Conditions to00A General Conditions -1and re-export the database. 

Issue 2 - Error Exporting Questions 

Log file error:

2022-03-25 10:47:53,896 ERROR DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter [(null)] - Error exporting question: Area
2022-03-25 10:47:53,896 ERROR DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter [(null)] - Error exporting questions in assembly: Concrete Slab
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at DatabaseManager.DatabasePlugin.SpreadsheetExport.SpreadsheetExporter.WriteQuestions()

Cause:

This is caused by the trailing spaces at the end of an Assembly Name 

Resolution:

Delete the trailing space and the end and re-export.