In Asp.net Retrieve cell value from excel sheet without using Microsoft office .dll
-
Wednesday, June 13, 2012 10:04 AM
Hi,
How can i use the Java function in C# (Asp.net). If we use J#, it can be possible to use java code as well as JAR file, which is written in java
code?
Thanks
- Edited by Asit Sinha Wednesday, June 20, 2012 8:19 AM
All Replies
-
Friday, June 15, 2012 9:44 AMModerator
Hi Asit,
Welcome to the MSDN forum!
Please check this link:
Considerations for server-side Automation of Office
http://support.microsoft.com/kb/257757Thanks.
Yoyo Jiang[MSFT]
MSDN Community Support | Feedback to us
-
Friday, June 15, 2012 7:10 PMModerator
Hello Asit,
Expecting a person viewing this thread in the forum to discern where in your code the problem occurs may be possible but assumes that a person would know the values of each variable used as an argument in the method calls and SQL statements and queries in the code. For example – what is [Dash$]? Is that the name of a database, an array of results, a range in an Excel table, or something else?
Rather than wait for someone else to debug the code you can see the results of each call by debugging your project in Visual Studio. Place breakpoints throughout, and step from one to the next. At each stop use the mouse pointer to highlight the value of each argument, then “step” to the next line of code and use the mouse pointer to highlight the returned value from the code in the line above.
Evaluate the returned value against what you expected and debug the code that does not provide the intended result.
Please remember to mark the replies as answer if they help and unmark them if the provide no help. and click "Vote as Helpful" this and other helpful posts, so other users will see your thread as useful. Best Regards, Chris Jensen
-
Monday, June 25, 2012 4:36 PMModerator
Hell Asit,
My original reply was for the wrong thread, and you correctly marked it as not relevant to the issue. Please accept my apology. Here is a list of links to content that does address your issue.
The C# Programming Language for Java Developers
http://msdn.microsoft.com/en-us/library/ms228602(v=VS.90).aspxC# Code Examples for Java Developers
http://msdn.microsoft.com/en-us/library/ms228363(v=VS.90).aspxC# Application Types for Java Developers
http://msdn.microsoft.com/en-us/library/ms228501(v=VS.90).aspxIn the following forum post the thread is for using VB .NET. Once you add a reference to the vjslib replace the ‘imports’ word with ‘using’.
referencing a .jar file
http://social.msdn.microsoft.com/forums/en-us/vbgeneral/thread/0BA9CAE0-C3A8-4131-8FEE-E10D78DB1E76Other content that discusses the issue, and may be helpful”
Java method.Super() keyword in C#
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/1c75b98c-1229-485d-a4b7-c74efeb01458C# vs Java - Method Override
http://social.msdn.microsoft.com/forums/en-us/csharpgeneral/thread/6889BCB4-E44F-4A5F-B40A-66788C789F84In another post there was the following about an earlier issue that was referred to a Microsoft Support Engineer who replied to the customer as follows:
“If you look at the registry for .jar extension you see not only do you have specify
javaw.exe and .jar file but also "-jar" flag which was missing.
[HKEY_CLASSES_ROOT\.jar]
@="jarfile"
[HKEY_CLASSES_ROOT\jarfile\shell\open\command]
@="\"C:\\Program Files\\Java\\jre1.5.0_04\\bin\\javaw.exe\" -jar \"%1\" %*"
“So in the console application change
“MPProcess.StartInfo.Arguments = "c:\\test\\x.jar";
to
MPProcess.StartInfo.Arguments = "-jar c:\\test\\x.jar";
“Making this change did not give the error earlier and lauched the JAR program
without the error.”Please remember to mark the replies as answer if they help and unmark them if they provide no help. and click "Vote as Helpful" this and other helpful posts, so other users will see your thread as useful. Best Regards, Chris Jensen
- Marked As Answer by Asit Sinha Tuesday, June 26, 2012 5:31 AM
-
Monday, June 25, 2012 5:09 PM
Hi,
How can i use the Java function in C# (Asp.net). If we use J#, it can be possible to use java code as well as JAR file, which is written in java
code?
Thanks
You might want to look into seeing if you can use Microsoft Data Access Components - ADO http://www.microsoft.com/en-us/download/details.aspx?id=5793

