Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone!

Does anyone know the simplest way to read content of table that is in a MS Word document that works on an ASP.NET IIS server, our perhaps have other suggestions on how to do this?

What I have tried:

I have been searching lots of answers about how to read a MS Word document table data, and find that can be done with a Word Interop reference, but it cannot be used and is not recommended to be used with ASP.NET. Another possibility is an Open XML library, but it's not working on ASP.NET and it shows an error, like the first method which always says access denied.
Posted
Updated 3-Feb-22 7:15am
v3

1 solution

As you are working on a server, you can't use Interop as the server is unlikely to have Word installed - and that's an absolute necessity for interop.

So pretty much, OpenXML or a similar package is your only option - but "access denied" isn't OpenXML's fault and will happen with all packages as it;'s your problem: the place the file is located (or you think it is located) is not accessible to the user that is running your web app - because IIS runs under its own user and that user is pretty restricted in terms of the folders it can "get at" for very understandable security reasons!

So start by looking at where the file is stored and either move it to a more suitable location (probably in a data folder under your website root folder or a separate machine with full access).

We can't do that for you! :laugh:
 
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