I try to read my Excel file and found this thread
but my problem is that after add using ExcelTools = Ms.Office;
it says that The type or namespace name 'Ms' could not be found (are you missing a using directive or an assembly reference?) although reference using Microsoft.Office.Tools.Excel
added
Asked
Active
Viewed 1,224 times
-1

Community
- 1
- 1

user3328870
- 341
- 2
- 7
- 23
-
1You shouldn't assume that an online code is right by default (not even codes from SO). Also you shouldn't copy codes without understanding what they do exactly (and the line `using ExcelTools = Ms.Office;` is clearly not part of .NET). So... I see two options: either ask the original author (Chris) or just take it as a reference and build your own code (what SO is actually meant to be). PS: if you look for the "Ms.Office" term in this link, you would see that some people have already asked about it (one further tip: in SO comments matter too). – varocarbas Feb 28 '14 at 18:14
2 Answers
1
Ms.Office
namespace is not part of Microsoft Office interop assemblies.
Code in the question you've linked use some custom libraries that implement helper classes/methods in Ms.Office
namespace. You either need to contact author for sources or remove the line and implement necessary helper functions yourself.

Alexei Levenkov
- 98,904
- 14
- 127
- 179
1
Please read the full thread, this reply in particular. It clearly states that Ms namespace is something that author (Chris) created himself.

Community
- 1
- 1

user270576
- 987
- 10
- 16