0

Is there a way to edit live view excel documents with c#?

We have an excel document that has jobs being added to it from several different computers, via a c# program, but it is also being viewed through microsoft teams. As far as I can work out, the document needs to be closed in Microsoft Teams on all computers to be able to be edited.

Is this correct? Or is there a workaround?

EDIT 1: For clarification, this document is currently being accessed by multiple users while my c# program runs, and so is rendered inaccessible to it.

EDIT 2: I just realised, the code I am trying to use opens the file in excel in desktop...That's my problem...So the real question is, am I able to access and use excel online using C#?

Poyda
  • 84
  • 11
  • Does this answer your question? [Is posible edit opened excel file](https://stackoverflow.com/questions/34611507/is-posible-edit-opened-excel-file) – Itai Klapholtz Mar 08 '21 at 05:26
  • Nope, due to the fact it is open on multiple computers, meaning I can't access their processes... – Poyda Mar 08 '21 at 05:52
  • @Poyda If you want several users to work in the same Excel workbook simultaneously, you can save the workbook as a shared workbook. Please refer to this [document](https://learn.microsoft.com/en-us/office/troubleshoot/excel/use-shared-workbook). – Mamatha-MSFT Mar 10 '21 at 19:16
  • Any update on this? – Mamatha-MSFT Mar 15 '21 at 08:08
  • I am already using a sharepoint. This is not the problem. Multiple users are able to access and work on the workbook currently, however when attempting to access the workbook using c#, through the sharepoint, it errors if someone has the workbook open. – Poyda Mar 15 '21 at 23:43
  • When you say SharePoint, do you mean SharePoint 365 online? That enables multiple concurrent editors. You mentioned "TeamViewer" which makes it sound like you have a different scenario. Also it would be useful to see the c# code you're using to open the file, and the exact error message – ADyson Mar 18 '21 at 08:04
  • 1
    Correct, Sharepoint365 online. "Microsoft Teams" not "Teamviewer". Will edit in the appropriate code to the question. – Poyda Mar 21 '21 at 20:19

0 Answers0