Data source reference is not valid ошибка

Office Products Excel 2010 Excel 2016 Excel 2013 Excel 2019 Excel for Microsoft 365 More…Less

Symptoms

When opening an Excel workbook that contains square brackets in the name (e.g., «foo[1]»), the user will receive the following error message when attempting to create PivotTables using data from within the workbook:

Data source reference is not valid

Cause

The cause is due to square brackets being invalid characters in an Excel workbook file name.

Resolution

This behavior is expected when these conditions occur. In order to work around this, the user would be required to remove all invalid Excel characters from the file name.

More Information

This issue may be seen when trying to open an Excel workbook from Internet Explorer. Internet Explorer creates a copy of the file in the temporary directory, renaming the file with square brackets. This can be avoided by clicking «Save,» instead of «Open,» when Internet Explorer presents the file to the user.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Summary: This article helps you in exploring different ways to fix Excel Data source reference is not valid error. Apart from this, get complete detail on why you are getting this error and how to fix pivot table data source reference is not valid error.

Many Excel users are reporting there are encountering the “Data source reference is not valid” error while trying to create a Pivot table in Excel.

Commonly the issue appears while opening the Excel workbook that contains square brackets ([]) in the name and trying to create Pivot Tables by using data from within the workbook.

To extract data from corrupt Excel file, we recommend this tool:

This software will prevent Excel workbook data such as BI data, financial reports & other analytical information from corruption and data loss. With this software you can rebuild corrupt Excel files and restore every single visual representation & dataset to its original, intact state in 3 easy steps:

  1. Download Excel File Repair Tool rated Excellent by Softpedia, Softonic & CNET.
  2. Select the corrupt Excel file (XLS, XLSX) & click Repair to initiate the repair process.
  3. Preview the repaired files and click Save File to save the files at desired location.

Practical Scenario:

Well, this is a very irritating error but is common as it is not limited to any particular Excel version. Let describe Excel data source reference is not valid error best with the user personal experience.

Recently, I have been getting this error message when I try to create a Pivot Table from Table in excel 2007. I have checked every single column and there is no empty one. I am really getting annoyed as the same data which have imported from CRM system sometimes work and other times does not work. If I also convert my data in to a range and try to insert PT, I get the same error.

Please help!

Posted in AccountingWEB community

Anyways this is not something that can’t be fixed, check out the possible fixes to troubleshoot pivot table data source reference is not valid error.

But before moving further, know what is causing Data source reference is not valid error in Excel.

Why I Am Getting The “Data Source Reference Is Not Valid” Error In Excel?

Well, the most common cause of the error is the square brackets (invalid characters) in the Excel workbook file name.

However, it is investigated despite this there are several other culprits as well that trigger data source reference is not a valid error message.

Here check them out:

1: Excel file not saved on the local drive

If you are trying to create a Pivot Table from an Excel file opened directly from the website or an email attachment then you may encounter the particular error message. As in this case, the file will open from the temporary folder and this won’t have the same permissions as a regular folder.

If you are having the related scenario then resolve the Excel data source reference not a valid error by saving the file on the local drive first.

2: The pivot table data refers to a non-existent range

If the range is not defined properly then this what caused the particular error. And you are trying to create a Pivot table with an undefined range then the same error appears. And to fix the error define the range before trying to create the Pivot table.

3: The data source refers to a named range that contains invalid references

This is another possible reason responsible for the Data source reference is not valid error. Well, if the range is defined but references to invalid values, the error crop up. So to fix it make use of the Name Manager to identify the values referenced and other necessary modifications to troubleshoot the problem.

4: Excel file name contains square brackets

Well, I discussed it earlier, if the name in Excel workbook contains square brackets then pivot table data source reference is not the valid error appears. Despite this there set of prohibited characters that Pivot tables won’t support. So to fix this Pivot table issue, edit the file name and remove square brackets and other forbidden characters.

So, these are some of the common reasons why you are getting the data reference is not a valid error in Excel. Now to resolve the error message, check out the possible fixes worked for the users to encounter a similar situation.

Make sure to follow the fixes in the order they are presented.

Here are the following fixes which you need to try for fixing up this Excel data source reference is not valid error. 

1# Remove File name Brackets

2# Saving file on the Local Disk

3# Assure the Range Exists and is Defined

4# Assure the reference for Named Range is Valid

5# Utilize Excel File Recovery Tool

Let’s discuss all these fixes briefly….!

Fix 1# Remove File Name Brackets

As discussed above this is the most common reason that triggers the pivot table data source reference is not valid error.

So, while creating a Pivot Table make sure the file won’t contain the forbidden characters. Apart from this check out the steps to modify the name of the XLSX or XLS file for removing the prohibited characters.

Follow the steps to do so:

  • Close the Excel window currently using the file.
  • Now utilize File Explorer to locate the Excel file location > and as you go there> right-click on it > select Rename.
  • And remove brackets from the file name and try recreating the Pivot table again.

Hope this works for you to fix the reference is not a valid Excel pivot table, but if still the error is not resolved then follow the next solution.

Don’t Miss: Ways to Repair MS Excel Pivot Table Corruption

Fix 2# Saving File On The Local Disk

You can also encounter the error if opening the file directly from the website or from an email attachment. And in this case, the file opened from a temporary file that at the end cause the Data source reference is not valid error.

Now, to resolve the issue save the Excel file to the local drive. And before creating the Pivot Table, go to File > Save as and save the file on the local drive.

As the file is saved, follow the steps that were causing the Data source reference is not valid error earlier.

It is estimated, you can now recreate the Pivots table without encountering the error.

Fix 3# Assure The Range Exists And Is Defined

If you are trying to insert Pivot Table in a non-existing or not defined range then this is another reason guilty for Excel data source reference is not valid error.

Let describe it best by creating a scenario, you are trying to create PivotTable, you will go to Insert PivotTable > select the toggle related with Select a table or range and set Table/Range to ‘test’.

And, if you have based the values on ‘test’ range and it won’t exist, you would encounter the “Data source reference is not valid” error just after clicking OK

However, if dealing with the same scenario then follow the below-given steps to fix the Excel error

Follow the steps to do so:

  • From the ribbon bar click the Formulas tab > click on Name Manager.
  • Now inside the Name Manager Window click on New > name the range you will create. And use the Refers to the box for setting the cells you desire to use for the range. You can type it yourself or utilize a built-in selector
  • Now the range is defined, you can create the Pivot table without getting the error.

Hope after defining a range before trying to create a Pivot table, you can fix the pivot table data source reference is not valid Excel error.

Fix 4# Assure The Reference For Named Range Is Valid

Well, if after defining the range you are still getting the data source reference is not valid error, then the chances are you are getting the error message because the named range is referring to some cells whose values are not valid.

To correct this simply go to Formulas > Name Manager and check if the range is referring to the cells that you need to analyze through the pivot table. Well, if you identify any conflicts > then use the Refer to box to make the switch to the correct value.

And as the modifications are made, try to create a Pivot Table again and check if the Excel data source reference is not the valid error is fixed or not.

I Hope, the given solutions will work for you to fix the Excel data source reference is not valid error.

Fix 5# Utilize Excel File Recovery Tool

Chances are also that due to the occurrence of corruption issue in the Excel pivot table you are getting this data source reference is not valid error. So if the above fixes fail to resolve the issue then try the Excel Recovery Tool to fix any type of corruption issue that occurred in the pivot table.

This is an advanced repair tool that allows repairing corrupted, damaged, inaccessible Excel files and some sort of errors in Excel. Not only this also recover the lost, deleted, corrupted Excel file data without any modification.

You can recover chart, chart sheet, table, cell comment, image, cell comment, formula, and sort & filter, and all data components from corrupt Excel files. It is easy to use and supports all Excel versions.

* Free version of the product only previews recoverable data.

Steps to Utilize Excel Recovery Tool:

Now It’s Your Turn:

So, this is all about the Excel data source reference is not valid error. I tried my best to put together the working solutions to fix the error.

Make use of the given solutions one by one to fix the error and start creating a Pivot Table without any error.

Hope the article helped you to solve all your queries. You can read one of our previous articles related to the Excel Pivot table issue PivotTable Field Name is not valid.

Despite this, I love to hear from you, feel free to share your valuable comments, queries, suggestions in the below comment section.

Good Luck….

Priyanka is an entrepreneur & content marketing expert. She writes tech blogs and has expertise in MS Office, Excel, and other tech subjects. Her distinctive art of presenting tech information in the easy-to-understand language is very impressive. When not writing, she loves unplanned travels.

Have you ever experienced a Data source reference isn’t valid Excel error?

It often happens while you are in the process of making a pivot table from a range in Excel. Not only the Excel version but OS users also tend to witness this Excel error.

So basically, what is the reason behind this error? Do you have any idea? Every time there is a cause and effect relation between two variables. The same is the case with Data source reference isn’t valid Excel error and reason behind this error.

The Reasons behind the Data Source Reference isn’t Valid Excel Error

Not a single reason, in fact, there are multiple triggers that let you face this error. After analyzing the nature of this error and the steps being taken to solve it, the ultimate upshot clears that several reasons fall behind this storyline. Let’s have a look:

  • Excel File Name has Square Brackets

In Pivot tables, some of the predefined characters are not allowed to use. One of the greatest reasons why data source reference isn’t valid Excel error appears is the presence of “[‘or’]”. In that case, you simply need to rename the file name and remove the brackets.

  • Excel File isn’t on the Local Drive

It might be possible that you have not saved the pivot table on your local drive. When you open a pivot table directly from the website or online, you may find this error. It is because your file does not have required access because it is a temporary folder excluding all the permissions as other folders. Saving the folder on the local drive can resolve the issue.  

  • The Pivot Table Data Refers to a Non-Existent Range

Do you know having an improper range can be a reason behind this error? In case, if you are making a pivot table with a non-existent range, you will surely have to face this error. By defining the range, you can get rid of this problem.

  • The Data Source Refers to a Named Range that has Invalid References

Here is another potential cause behind this error. Using the Name Manager to spot the values and executing the process of vital changes can help you solve this error.

Apart from these reasons, there can be some other causes as well. If you are in need to get rid of this error permanently, we are here for you. We have many more solutions to your Data source reference isn’t valid Excel error. Follow the tricks given below for the best results and you have to be stick to a single fix to solve the error.

We are going to explain each solution in detail with complete steps.

Let’s dive in:

Trick 1: Removing Brackets from the File Name

Incorrect file names can be one of the biggest reasons to show errors. As you already know this error can be gone by just renaming the file name. If your reports are auto-generated, it might be possible that your file name contains forbidden characters including square brackets [ ], you will surely find this error while creating a pivot table.

Renaming the name of the .xlsx file to remove unwanted characters is the solution to it. Follow the steps:

  • If your file is in use, you have to close it to rename the file.
  • Using File Explorer, you can navigate the location of the Excel file. After reaching there, you have to right-click on it and choose Rename.
  • Remove brackets from the file name because the pivot table does not support such characters.
  • Now, try creating the Pivot table once again and check if the Data source reference isn’t valid Excel error still exists or not.

If the error is solved you are done. However, if you are still having issues, it means this solution is not suitable for the scenario. You need to move forward to check the next method.

Trick 2: Saving the File on the Local Drive

Opening a file directly from the website or email attachment can put you in trouble. You will be in Read-only mode while doing this. To edit the file, you need to save it in your system. It can be a potential reason behind this error. Follow the steps given below to find a perfect solution:

  • Go to File and then choose Save As option.
  • Choosing the Save As option will let you save the file on your local disk.
  • Once the file is saved on your local drive, your file will be error-free. For further satisfaction, you can check the pivot table if the Data source reference isn’t valid Excel error still appears or not.

Again, if this method is not successful for you, don’t worry about it.

For the current scenario, this method was not applicable, that’s why you need to move on to the next solution.

Trick 3: Predefined Range Existence

Unlike other reasons, this cause is a bit tricky to understand. While trying to add a pivot table in a non-existing range, you may stumble upon this reference error.

To get rid of this problem, you need to follow the steps given below:

  • Go to Insert PivotTable and choose the toggle linked with Select a table or range.
  • Now, set the Table/Range to “test”.

If your values are based on the “test” range, which isn’t there, then surely you will encounter the Data source reference isn’t valid Excel error right after pressing the OK button.

If this is the case, you can work on it by defining a range before making a pivot table. Here is how you can do this:

  • Click the Formulas tab that appeared on the ribbon bar.
  • Choose the Name Manager given in the list.
  • In the Name Manager window, select New and name the range you wanted to create.
  • Now, use the Refers to box to set the cells reserved for the range.
  • Now the range is well-defined and you can easily make pivot tables without facing the error message.  

Move down to the next solution, if you are still encountering the same issue even after trying all the above-mentioned solutions.

Trick 4: Reference for the Named Range is Valid or Not

After successfully defining the name range, if you still getting an error message, it might be possible that the named range is referring to some cells whose values are not valid.

To sort out this problem, follow the steps given below:

  • Go to the Formulas tab and open Name Manager.
  • Now, check if the range is referring to the cells that are reserved to analyze through the pivot table.
  • Use the Refer to box, in case you witness any variations to make the switch to the correct value.

Once you are done with all the changes, try making a pivot table again and check if the Data source reference isn’t valid Excel error still appears or not.

When working with pivot tables, we sometimes encounter the error “Data source reference is not valid”.  

Figure 1.  “Data source reference is not valid” error message in Excel

Most probably, the reason for the error is one or more of the following:  

  • Excel file name contains the characters “ [ or “ ] ” or square brackets  
  • File comes from the email or on the web and is not saved in the local drive  
  • The pivot table data source refers to a non-existent range  
  • The data source refers to a named range with invalid reference  

Checklist to Correct the Source Reference Not Valid Error

  • Check the Excel file name.  If it contains any square brackets, rename the file and remove the brackets.  

Example:

Below is an example of a simple table with range B2:E6.  

When we try to insert a PivotTable, an error is displayed and the pivot table is not created.  

Figure 2.  Error in creating a pivot table

Rationale:

As shown, the file name is “[Correcting] the Source Reference not Valid Error in a Pivot Table.xlsx”. Note the square brackets in the word Correcting.  

Work-around:

Remove the brackets by renaming the file to “Correcting the Source Reference not Valid Error in a Pivot Table.xlsx”.

Figure 3.  Renaming the Excel file to remove square brackets

  • Save the Excel file to the computer or local drive.  

  • When inserting a pivot table with a named range, make sure the range exists and is defined.

Example:

Let’s use below data and create a pivot table.  

Figure 4.  Data for pivot table

Select cell G2, then click the Insert tab.  

Click PivotTable.

Figure 5.  Inserting a pivot table

In the Create PivotTable dialog box, enter “Data” into the Table/Range bar.

The “Data source reference is not valid.” error pops up.  

Figure 6.  Error in creating a pivot table with a named range

Rationale:

The error naturally exists because we tried to create a pivot table basing the values on the range “Data”, when in fact, the range does not exist  and is not defined.

Work-around:

We first define a named range before we use it to create a pivot table.  

Defining a Named Range

Step 1. Click the Formulas tab, then select Name Manager.

Figure 7.  Creating a named range using Name Manager

Step 2. In the Name Manager dialog box, click New.

Figure 8. Creating a new range

Step 3. Let us name the range “Data”.  Click the Refers to bar and select cells B2:E6 to define the range “Data”.

Figure 9.  Defining the named range

Figure 10.  Named range “Data” created

We have defined the range “Data”.  We can now successfully create a pivot table using this range.  

Figure 11.  Creating a pivot table with a named range

Figure 12.  Output: Pivot table created with the range “Data”

  • Ensure that  the reference for the named range is valid.  

Supposed we have a named range “Data”, but the reference is “=1”.  This will result to an error because a named range should refer to the cells whose values we want to analyze through a pivot table.  The value “1” does not return a valid range of values.

Figure 13.  Named range “Data” with invalid reference

  • Ensure no blank field names.  

The sample table below will result into an error because column E has a missing field name.  

Figure 14.  Source table with missing field name

  • Remove errors in any of the cells in the source data such as #VALUE!, #NAME?,  #REF.

Next time we encounter the “Source reference not Valid Error”, we only have to follow the checklist discussed in this article.  It will lead us to the quick correction of the error.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Some users have been getting the “Data source reference is not valid” when trying to create a pivot table from a range in Excel. This particular error is reported to occur with multiple Excel and Windows version – so the issue is neither OS or Excel version specific.

Source Reference not Valid error

What is causing the “Data source reference is not valid” Error in Excel?

We investigated this particular error message by looking at various user reports and the repair steps that they followed in order to resolve the issue. As it turns out, there are several common culprits that will end up triggering this particular error message:

  • Excel file name contains square brackets – There are a set of forbidden characters that are not supported by Pivot tables. One popular reason why you might be seeing this particular error is if the excel file name contains ‘[‘ or ‘]’. In this case, the issue can be resolved by editing the file name and removing the square brackets.
  • Excel file is not saved on the local drive – You might be seeing this particular error message if you attempt to create a Pivot Table from an Excel file opened directly from a website or an email attachment. In this case, the file will be opened from a temporary folder, which doesn’t have the same permissions as a regular folder. If this scenario is applicable, you can resolve the issue by saving the .xlsx file on your local drive first.
  • The pivot table data refers to a non-existent range – A range that is not defined properly can also be causing this particular error. If you’re trying to create a Pivot table with a range that wasn’t defined, you’ll be by the same error message. In this case, you can resolve the issue by defining the rage before attempting to create the PivotTable.
  • The data source refers to a named range that contains invalid references – Another possible reason why this error occurs is when the range is defined but it references to invalid values. In this case, you can use the Name Manager to identify the values referenced and make the necessary modifications to resolve the issue.

If you’re currently struggling to resolve the Data source reference is not valid error, this article will provide you with several troubleshooting steps that will help you identify the problem that is triggering the error message. Below you’ll find a collection of methods that other users in a similar situation have used to get this resolved.

For the best results, follow the methods in the order that they are presented. You should eventually stumble upon a fix that will be effective in your particular scenario.

Let’s begin!

Method 1: Removing brackets from the file name

One of the most popular reasons that will end up triggering the Data source reference is not valid error is an incorrect Excel file name. If the reports are generated by a report automation system and the name contains forbidden characters like square brackets ‘[]‘, you’ll get this error message whenever you try to create a PivotTable.

If this scenario is applicable to your current situation, you will be able to resolve the issue by modifying the name of the .xlsx file to remove the forbidden characters. Here’s a quick guide on doing this:

  1. Close the Excel window that is currently using the file. If the file is in use, you won’t be able to rename it.
  2. Use File Explorer to navigate to the location of the Excel file. Once you get there, right-click on it and choose Rename.
  3. Next, go ahead and remove brackets from the name of the file since Pivots table is not configured to support them.
    Removing the brackets from the file name
  4. Attempt to recreate the Pivot table again and see if you’re still encountering the error.

If you’re still encountering the Data source reference is not valid error or this method wasn’t applicable to your particular scenario, move down to the next method below.

Method 2: Saving the file on the local disk

This issue might also occur if you are opening a file directly from a website or directly from an email attachment. In this case, the file will be opened from a temporary file, which will end up triggering the Data source reference is not valid error.

If this scenario is applicable to your current scenario, you will be able to resolve the issue by saving the Excel file to a local drive first. So, before attempting to create the Pivot table, go to File > Save as and save the file on a physical location (on your local drive).

Saving the Excel file on the local drive

Once the Excel file has been locally saved, recreate the steps that were previously triggering the Data source reference is not valid error and see if you can create the Pivots table without encountering the error.

If this method wasn’t applicable to your current situation, move down to the next method below.

Method 3: Ensuring that the range exists and it’s defined

Another reason why you might encounter the “Data source reference is not valid.” error when trying to insert a Pivot Table is a non-existing / not defined range.

To put this into perspective, let’s say that you’re trying to create PivotTable. Naturally, you go to Insert PivoTable, you select the toggle associated with Select a table or range and set the Table/Range to ‘test’. Now, if you’ve based the values on the ‘test’ range and it doesn’t exist, you will see the “Data source reference is not valid.” error as soon as you click Ok.

Seeing the error due to non-existing range

If this scenario is applicable, you will be able to work-around the issue by defining a range before attempting to create a pivot table. Here’s a quick guide on how to do this.

  1. Click the Formulas tab from the ribbon bar, then click on Name Manager from the list.
  2. Inside the Name Manager window, click on New and name the range that you’re going to create. Then, use the Refers to box to set the cells that you want to use for the range. You can either type it out yourself or use the built-in selector.
  3. Now that the range is defined, you can successfully create the pivot table without encountering the same error message.

If this scenario was not applicable or you’re still encountering the Data source reference is not valid error even after performing the steps above, move down to the next method below.

Method 4: Ensuring that the reference for the named range is valid

Even if you have successfully defined the range but you are still seeing the Data source reference is not valid error, chances are you’re seeing the message because the named range is referring to some cells whose values aren’t valid.

To rectify this, go to Formulaes > Name Manager and see if the range is referring to the cells that you want to analyse through the pivot table. If you see any inconsistencies, use the Refer to: box to make the switch to the correct value.

Ensuring that the references are valid

Once the modifications are made, attempt to create a Pivot Table again and see if you’re still seeing the same error message.

Photo of Kevin Arrows

Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Понравилась статья? Поделить с друзьями:
  • Dash 28 что это ошибка
  • Dash 27 https ошибка
  • Dasd ошибка ibm сервер
  • Danfoss w24 ошибка
  • Danfoss vlt ошибка w104