Open Excel without displaying the workbook
decoalaa
Posted messages
18
Status
Member
-
Polux31 Posted messages 7219 Status Member -
Polux31 Posted messages 7219 Status Member -
Hello,
I need to use Excel in a data comparison tool, and actually I want to execute it but without displaying the workbook, because I want to use it from an interface but without seeing the Excel page.
Does anyone have an idea, please?
I need to use Excel in a data comparison tool, and actually I want to execute it but without displaying the workbook, because I want to use it from an interface but without seeing the Excel page.
Does anyone have an idea, please?
Configuration: Windows XP Firefox 3.0.3
18 answers
-
Thank you for your response, but actually I don't quite see how we can do this with this connection.
Can you explain it to me a bit please?
Thanks in advance. -
Hello,
We can work in a closed Excel workbook using an ADO connection to the workbook.
;o)
--
“What is well conceived is clearly stated, And the words to say it come easily.”
Nicolas Boileau -
You will find everything you need here: https://silkyroad.developpez.com/VBA/ClasseursFermes/
;o)
--
“What is well conceived is clearly said, and the words to say it come easily.”
Nicolas Boileau -
OK, but in the link, it talks about a closed file, and in my workbook, I have Macros. Wouldn't that be a problem since the macros only run with an open file?
-
Hello to both of you,
For what you want to do, there's a simpler solution: just after opening it, make it hidden
Example:
Workbooks.Open Path & ""Workbook1.xls"
Windows("Workbook1.xls").Visible=False
See you!
--
Experience teaches more surely than advice. (André Gide)
If you bump into a pot and it sounds hollow, it doesn't necessarily mean the pot is empty. ;-)(Confucius) -
Hello hermit,
I believe this is the right method, but since I'm not very proficient in Excel, I wanted to know where exactly these command lines should be placed? In the workbook? -
Actually, it's all good, I found how to do it, but the problem now is that I can't edit it to modify it since it's now hidden.
-
To see it, you need to set the Visible property to True instead of False
;o)
--
“What is well conceived is clearly stated, and the words to say it easily come.”
Nicolas Boileau -
-
In fact, there is always a problem; now that it is hidden, I can only open it in read mode, and as a result, I can't modify it to change false to true.
-
It must be done from the application that controls the hidden file.
;o)
--
“What one clearly conceives, one can state clearly, and the words to say it come easily.”
Nicolas Boileau -
I don't really see what you mean, what is the application you're talking about?
-
I need to use Excel in a data comparison tool
I imagine it's the comparison tool, otherwise what would be the point of opening and hiding an Excel file???
;o)
--
«What is well conceived is clearly stated, And the words to say it come easily.»
Nicolas Boileau -
Well yes, but the tool does not contain the Macro code; the tool only calls the Excel sheet which takes care of retrieving data and providing it for further processing.
So the Macro code only exists in the Excel file, and if I can't open it (because it is hidden), I can't modify it. -
What is the tool?
If it can open an Excel file, it should be able to hide it, make it visible, and run the macro, etc.
;o)
--
“What we conceive well is clearly stated, and the words to say it come easily.”
Nicolas Boileau -
It's good, thanks, I found out how to do it; you just need to raise the security level and then disable macros, that allows you to modify them afterwards.
Thanks for your help. -
You're welcome
Good luck
;o)
--
“What is well conceived is clearly stated, and the words to say it come easily.”
Nicolas Boileau -
Indeed, this method doesn't work :o|
--
"What is well conceived can be clearly stated, and the words to say it come easily."
Nicolas Boileau