Click here to Skip to main content
15,904,024 members
Please Sign up or sign in to vote.
1.00/5 (6 votes)
See more:
Hi Team,

I need c# code for whether to check Excel sheet is opened or not if it's open i want to refresh the that Excel please provide solution for this on Priority.

Need to Refresh already Open workbook.

Best Regards,
VenkataKrishna Telukuntla

What I have tried:

[Removed childish garbage string]
Posted
Updated 16-Aug-19 2:17am
v2
Comments
MadMyche 16-Aug-19 9:22am    
Thank you DK

It doesn't quite work like that.
We do not do your work for you.
If you want someone to write your code, you have to pay - I suggest you go to Freelancer.com and ask there.

But be aware: you get what you pay for. Pay peanuts, get monkeys.

The idea of "development" is as the word suggests: "The systematic use of scientific and technical knowledge to meet specific objectives or requirements." BusinessDictionary.com[^]
That's not the same thing as "have a quick google and give up if I can't find exactly the right code".
So either pay someone to do it, or learn how to write it yourself. We aren't here to do it for you.

And BTW: posting a line of 480 "A"s doesn't make you look like a professional: just like a ten year old idiot ... just a thought for you.
 
Share this answer
 
This is not going to happen the way you are envisioning it:

Generally it is very hard for one program (yours) to interact with files that another program (Excel) is working with.
While Excel is built for interaction, due to all the security implications; it needs to be set up to allow this AND the file itself would need to support Macros.

TLDR;
You are going to need to embed a Macro within your spreadsheet; I would probably set it to be on a timer to check to see if a refresh is needed and if so do it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900