I’m trying to call a function from a 3rd party Excel-add in a VBA-sub. The function loads data from a database into specified cells in the Excel workbook.The function I’m calling is huge and unfortunaly I can’t post it in its entirety, but here are the first two lines:
Public Function loadFromDatabase(ByVal XLname As String, ByVal sMark As String)
Dim xlWB As Workbook
Then it declares a bunch of variables before running the following tests:
'
' Get the excel book and check if it is run in compatibility mode
'
Set xlWB = getXLBook(XLname)
If xlWB Is Nothing Then
loadFromDatabase = "Workbook '" + XLname + "' not found!"
Exit Function
End If
bExcel8Limits = True
If isExcel2007orLater Then
bExcel8Limits = bCheckCompMode(xlWB)
End If
Here I get this message: «Workbook » not found!» http://imgur.com/HQFAzoC .
The getXLBook function looks like this:
'
' Routine to get a specified Workbook
'
Function getXLBook(sName As String) As Workbook
Dim xlWB As Workbook
On Error Resume Next
Set xlWB = Nothing
Set xlWB = Application.Workbooks(sName)
On Error GoTo 0
Set getXLBook = xlWB
End Function
A hint here may be that I’m able to call the function from a Private Sub
place in a worksheet like this…
Private Sub loadFromDB()
Dim res As Variant
res = Application.Run("loadFromDatabase", Me.Parent.Name, "")
If res <> "OK" Then
MsgBox res
End If
End Sub
…but not from a module in the same workbook like this
Sub loadFromDB_test()
Dim res As Variant
res = Application.Run("loadFromDatabase", XLname, sMark)
If res <> "OK" Then
MsgBox res
End If
End Sub
Any suggestions?
Edit: To clarify, it’s when running loadFromDB_test the «Workbook not found» message pops up.
Edit 2: An obvious hotfix (that I didnt think of) is to just call the Private Sub
in the worksheet from the Sub
in the module.
Sub load_test_new()
Application.Run "Sheet1.loadFromDB"
End Sub
From a learning point of view this is clearly not a good solution as it is inefficient coding.
- Remove From My Forums
-
Question
-
User359756414 posted
Hi all,
I’m uploading some data from an Excel file into Sql Server 2000.
I’m using Excel.Import.Query(string fileName) method to convert the data into a datatable.
When I’m running my application from Visual Studio .Net 2005 , it is working fine.
But, when I’m running my application on IIS, it is giving error «Workbook not Found.»
Please help me.
All replies
-
User-1734134863 posted
Hi,
As far as I can see, please confirm that the «file» is in a correct position. And what’s the type of the filename’s path? I suggest to use the relative path of the filename.
If I misunderstood the problem, please inform of me.
Sincerely,
Zong-Qing Li
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
Answer” if a marked post does not actually answer your question. -
User359756414 posted
Hi,
what would be the «correct» position for that file? I’m using absolute paths because this is the only way my file can be uploaded by FileUpload Control (as per my knowledge). thanks for reply
-
User2032571450 posted
what would be the «correct» position for that file?
I think. It should be in Server. c:InetpubwwwrootYourApplication.
-
User359756414 posted
Hi punith,
It means that first I must upload this file onto the server and then use it to upload the data?
if yes, why don’t I need to do this when I am running my application from VS.Net 2005?
thanks
Excel VBO — Workbook Not Found : Workbook named: C:UsersxxxxxxDocumentsemaillist.xls not found in instance: 1
-
1.
Excel VBO — Workbook Not Found : Workbook named: C:UsersxxxxxxDocumentsemaillist.xls not found in instance: 1Hi
I am trying to collect emails list using MS Outlook VBO into a collection. This works fine. I want to write this collection to excel, this is were my problem starts.
My process look like the attached. Every time try to write the collection to Excel. I get the following error. «Workbook Not Found : Workbook named: C:UsersxxxxxxDocumentsemaillist.xls not found in instance: 1″
I have tried the following to fix it with no luck.
1. Change file extension from .xlsx to .xls — did not work
2. Used Environment Utility — Start process to launch Excel, it launched fine, but still encountered the same error.
3. Used General Utility — I used this between Create Instance and Open Workbook to delay Open Workbook giving time to the instance to finish loading.
4. I have used Show to see the excel launch and it does launch.
Can somebody assist with resolving this issue. I have a demo to few directors to demonstrate the benefits of RPA. I would grateful.Thanks in advance
George——————————
George Kattapuram
PM
GAK Services Ltd
—————————— -
2.
RE: Excel VBO — Workbook Not Found : Workbook named: C:UsersxxxxxxDocumentsemaillist.xls not found in instance: 1HI
are you using the same handle and workbook names for both open workbook and write collection to excel stages ?
it seems there is issue with handle
Thanks
Rakesh——————————
Rakesh Mudunuri
assistant technical servce engineer
Fujitsu consulting india
Asia/Kolkata
—————————— -
3.
RE: Excel VBO — Workbook Not Found : Workbook named: C:UsersxxxxxxDocumentsemaillist.xls not found in instance: 1Hello, George!
For the Write Collection action to work properly, we must pass the Workbook Name as a parameter, not the full File Path. In your case, I believe the Workbook Name to be: emaillist.xls and the file path to be C:UsersxxxxxxDocumentsemaillist.xls.
See bellow printscreen as an example
——————————
Diogo Furlan
Analyst
Grupo NC
America/Sao_Paulo
—————————— -
4.
RE: Excel VBO — Workbook Not Found : Workbook named: C:UsersxxxxxxDocumentsemaillist.xls not found in instance: 1Thank Diogo, All working now.
——————————
George Kattapuram
PM
GAK Services Ltd
——————————
Welcome to the Blue Prism RPA Product Community!
Whether you’re looking to manage a complex infrastructure, maintain security and compliance, bring new products to market faster, or gain operational speed and agility in an uncertain economy, Blue Prism delivers — with the flexibility you need to create the business you want. From deployment on-premise, through a cloud service provider or as SaaS, to a skillful and adaptable digital workforce that continually expands to meet your enterprise needs, you can gain enhanced operational insight and control while your people reclaim the time they need to focus on great work.
Product PageKnowledge BaseBlue Prism Training Offering
Product Research ProgramUpdates, Releases & Announcements
FAQs
Blue Prism is intelligent automation — business-developed, no-code automation that pushes the boundaries of robotic process automation (RPA) to deliver value across any business process in a connected enterprise.
A combination of RPA with expanded cognitive and AI capabilities, Blue Prism is different than other automation technology on the market. With one Blue Prism license, you gain instant access to an already AI equipped digital workforce, along with the tools you need to build and delegate automations. Click here for more information on Blue Prism and Intelligent Automation.
To learn more about how Blue Prism RPA can help your organization and how much it will cost to get started, please Contact our Sales department.
Blue Prism RPA can be downloaded from our customer portal. If you would like to consume or download any material it is necessary to create an account on the Portal. Once you have registered, you can access the download options for Blue Prism here.
Yes! Installed on your own machine and supported by our training materials and product documentation, you can use all the features of the full enterprise product for free with our Blue Prism Trial – giving you the opportunity to learn the basics before moving to a full production implementation. Click here for more information and to download the trial.
Yes! You can access our known issue list for Blue Prism from our Support Portal.
Regardless of your industry, Blue Prism’s Digital Workforce can adhere to strict governance and compliance standards without limiting productivity. Click here for more information on how your industry can benefit from Blue Prism.
-
#1
Unable to open the excel workbook it shows message -File Not Found «file.xlsx» does not exist or is not a file
-
Excel_workbook.JPG
19.9 KB · Views: 274
VJR
Well-Known Member
-
#3
Hi VJ,
G is a local drive. Even i tried «G:\Infanion_CC\Blue_Prism\Excel\Alexa.xlsx». Still im unable to open the file.
VJR
Well-Known Member
-
#4
Hi shankar,
In the screenshot it shows the file name as abcd.xlsx but in the above path it is Alexa.xlsx. Is the stage referring to a different file or instance/handle? Can you take care of that.
Also you can get the exact file name with path by simultaneously pressing Shift and then right clicking on the file. That menu will show ‘Copy as path’ along with double quotes. Paste that along with the quotes in the open stage parameter.
-
#5
Hi VJ,
Thanks for the quick response. The handle was wrong i corrected it and working fine now.
-
#6
I am facing this same issue . Can anybody help as to what can the issue be and how can i resolve it. I am simply trying to open the excel workbook. But it gives the error as » File Not found. File does not exist or is not a File»
-
#7
I am facing this same issue . Can anybody help as to what can the issue be and how can i resolve it. I am simply trying to open the excel workbook. But it gives the error as » File Not found. File does not exist or is not a File»
Hello Trupti,
Please provide correct handle number and make sure that the filepath doesn’t has «» starting and ending position.
If you still face the same issue please ping me.
VJR
Well-Known Member
-
#8
Hi Trupti,
At which stage are you seeing this error. If it is at the Open Workbook then do provide the correct handle and the File Name parameter enclosed within quotes. A good way to get the correct file name is go to the location of the file and while pressing Shift, right click on the file. Now you will see an option as ‘Copy as path’. This is copied along with double quotes enclosed to the path. Paste it directly into the File Name parameter without making any changes. The other thing is to make sure to use the correct Handle.
-
#9
facing the same issue, Can anybody suggest on this?
tried all things mentioned above but still not working
-
#10
facing the same issue, Can anybody suggest on this?
tried all things mentioned above but still not working
Then contact your SME.
-
#11
When I was unable to open my Excel file I was encountering this error message ‘Excel Cannot Open The File ‘(Filename)’.Xlsx’.
The very first reason behind getting this error is the file extension mismatches. So why don’t you just try changing the Excel Sheet File Extension:
- Verify the support of .xlsx extension and after then go to the ‘My Computer’.
- Now browse the Tools > Folder Options > File Types.
- Check the ‘xlsx’ extension is included there or not. If it’s not then rename the file and change the ‘.xlsx’ to ‘.xls’.
For more fixes like this, check out this post on Excel cannot open the file.
Summary: Read this blog to understand what causes the Excel 2016 opens blank workbook when opening file issue. Also, it mentions the solutions to fix this issue. Also, you’ll find an Excel file repair tool that can quickly restore your Excel workbook with complete data.
When opening a Microsoft Excel 2016 workbook by double-clicking on it, you may find that Excel displays a blank workbook. More precisely, just a blank grey screen appears instead of the file you expect to see. Such an issue can be caused by something as simple as a messed up Excel ‘Preferences’ settings or something more complicated like underlying corruption in the workbook. Regardless of what causes the issue, you can fix it using some simple solutions mentioned below.
Figure 1 – Excel 2016 Blank Workbook
Solutions to Fix the ‘Excel 2016 Opening Blank Workbook’ Issue
Following are some solutions you can try to fix the ‘Excel 2016 blank screen when opening file’ problem.
Note: Before trying these solutions, make sure that the sheet you’re trying to open is not hidden. To locate hidden sheets in Excel, go to ‘View’ tab and check if the Unhide option is greyed out. If not, unhide your workbook.
Solution 1: Copy the Data to a New Workbook
Instead of clicking on the file name to open Excel spreadsheet, try opening it from Excel. For this, start Excel and click File > Open > Computer > Browse to locate the file. If it opens, copy and paste the file data to a new workbook.
Note: The solution might help you regain access to the file data but the problem may persist.
Solution 2: Uncheck the ‘Ignore DDE’ Option
When a user double-click an Excel workbook in Windows, a dynamic data exchange (DDE) message is sent to the Excel application, instructing it to open that workbook. If the DDE message is set to be “ignored” in Excel, double-clicking a workbook will open a blank screen. So check the value of this setting and uncheck the “ignore DDE” option (if enabled). Follow these steps:
- In Microsoft Excel, click on File > Options. This will open the ‘Excel Options’ window.
Figure 2 – Excel File Options
- On the ‘Excel Options’ window, click Advanced and scroll down to the General section.
Figure 3 – Locate General Section from Excel Advanced Settings
- Uncheck the box next to “Ignore other applications that use Dynamic Data Exchange (DDE)”.
Figure 4 – Uncheck DDE Option
- Click on OK.
Solution 3: Disable Hardware Graphics Acceleration for MS Excel Workbooks
Excel workbooks often demonstrate unanticipated symptoms, especially if you are using graphics (like advanced charts) in your Excel sheets.
The ‘Excel open blank workbook’ error may occur if the graphics card of your computer won’t function properly due to problem with hardware acceleration. To fix this, turn off hardware acceleration for MS Excel by following these steps:
- In MS Excel, click on File > Options to open the ‘Excel Options’ window.
Figure 5 – Open Excel Options Window
- Click on the Advanced tab and then locate Display section.
Figure 6 – Locate Display Section from Excel Advanced Settings
- Check the box next to “Disable hardware graphics acceleration”.
Figure 7 – Disable Graphics Hardware Acceleration
- To apply the changes you’ve made, click OK.
Solution 4: Reset Excel Workbook File Associations
Verify if the file associations in the system are performing correctly and reset the ones pertaining to Excel to their default settings. To do this, follow these steps:
- For Windows 10
- Open Windows 10 settings.
- From the ‘Settings’ screen, click on Apps.
Figure 8 – Open Windows 10 Apps
- From the ‘App Settings’ window, click Default Apps and then click the Reset button under ‘Reset to the Microsoft recommended defaults’.
Figure 9 – Reset File Associations to MS Recommended Defaults
Executing these steps will reset all of the Excel file associations to the Microsoft recommended default apps in Windows 10.
- For Windows 8/ Windows Vista/ Windows 7
- Click on Control Panel, select Programs, and then click on Default Programs.
Figure 10 – Open Default Programs
- Click on ‘Set your default programs’ to open currently installed programs.
- Select Excel from the list of default programs and then click ‘Choose default for this program’.
- In the ‘Set Program Associations’ window, click on Select All and then hit the Save button.
Solution 5: Repair MS Office Installation
If the above solutions fail to resolve the issue, your MS Office installation might be damaged. Try repairing it using the following steps:
- Open Control Panel and select Programs and Features.
- Select ‘Microsoft Office’ in the programs list and then click the Repair option.
- If prompted, click on Continue.
Note: This process can take a little time to complete. Do not interrupt it before it is completed.
Also read: Excel AutoRecover not Working, What is Next?
Solution 6: Repair Blank Excel Workbook with Excel Repair Software
If the Excel 2016 opens blank screen problem persists, the Excel workbook you’re trying to open might be severely damaged. In this case, repair the Excel workbook by using Stellar Repair for Excel software. The software can fix all types of Excel errors and restore all tables, charts, cell comments, images, formulas, sorts, and filters to a new working Excel workbook. You can free download the tool’s demo version to scan and preview recoverable data from the file.
Read this: How to repair corrupt Excel file using Stellar Repair for Excel?
Conclusion
If you’re facing the Excel 2016 opens blank workbook when opening file issue, try resolving the issue by implementing the solutions discussed in this blog. However, if the manual solutions doesn’t fix the problem, you can rely on Stellar Repair for Excel software to repair and restore your .XLS/.XLSX workbook following a few simple steps. Also, it helps recover complete workbook data.
About The Author
Priyanka
Priyanka is a technology expert working for key technology domains that revolve around Data Recovery and related software’s. She got expertise on related subjects like SQL Database, Access Database, QuickBooks, and Microsoft Excel. Loves to write on different technology and data recovery subjects on regular basis. Technology freak who always found exploring neo-tech subjects, when not writing, research is something that keeps her going in life.
Best Selling Products
Stellar Repair for Excel
Stellar Repair for Excel software provid
Read More
Stellar Toolkit for File Repair
Microsoft office file repair toolkit to
Read More
Stellar Repair for QuickBooks ® Software
The most advanced tool to repair severel
Read More
Stellar Repair for Access
Powerful tool, widely trusted by users &
Read More