xlsx error: “Removed Records: Named range from /xl/workbook.xml part” when tried to resolve errors

痞子三分冷 提交于 2019-12-09 02:49:18

问题


I have an xlsx file that I generate using SSIS. The data to this file is written through a data flow task where the xlsx file is the oledb destination. I have used the following connection string as an expression for the OLEDB connection:

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+ @[User::ExcelPath] +";
Extended Properties=\"Excel 12.0 Xml;HDR=YES\";"

The file opens just fine before the data flow task. After the data flow task, I get a dialog as follows:

When I click yes, I get another message:

The contents of the xml file are

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">       <logFileName>error072840_02.xml</logFileName><summary>Errors were detected in file   'C:\output\documentId-1.xlsx'</summary><removedRecords summary="Following is a list of removed records:"><removedRecord>Removed Records: Named range from /xl/workbook.xml part (Workbook)</removedRecord></removedRecords></recoveryLog>

I am not able to figure out what exactly is causing this error. Any help will be appreciated. TIA


回答1:


I had this issue when I was using EPPlus to customise an existing template. For me the issue was in the template itself as it contained invalid references to lookup tables. I found this in Formula -> Name Manager.

I suggest that you check the template if you face this issue.




回答2:


Got it resolved. I don't really know the reason. Did some research and came to know that something related to tab names can cause this issue. I had to tabs with names like 'tab' and 'tab(2)'. May be possible that xlsx treats them as same names.




回答3:


In my case similar error was caused by sheet (tab) name longer than 30 characters.




回答4:


Maybe a special character in your tab name and you define name range with the tab name. such as tab name is "A(1)", just change it to "A(1)"




回答5:


For me personally, spaces/special characters were irrelevant in the tab (Sheet) names. The named range itself cannot have spaces/special characters as it is treated like a variable




回答6:


For me it was a button with a macro assigned with a value like : 'MyMacro("MyParam")'



来源:https://stackoverflow.com/questions/18539267/xlsx-error-removed-records-named-range-from-xl-workbook-xml-part-when-tried

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!