15,897,371 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Jagadish M Vadavatti (Top 13 by date)
Jagadish M Vadavatti
8-Aug-14 5:52am
View
See friend, I have 10 systems in my network. I want to know that each system visited URLs from the different browsers.
example.
System1:
www.google.com
www.facebook.com\radiocity
www.flipkart.com
System 2 :
www.amazon.com
http://aspsnippets.com/Articles
http://www.codeproject.com/Questions
like this from all the systems.
:)
Jagadish M Vadavatti
7-Mar-13 8:37am
View
ok
Jagadish M Vadavatti
7-Mar-13 8:34am
View
ya path also intranet path only..
Jagadish M Vadavatti
7-Mar-13 8:31am
View
ya the code also executes in intranet only.
Jagadish M Vadavatti
7-Mar-13 8:28am
View
it is giving the Invalid Internet address error. so
Jagadish M Vadavatti
7-Mar-13 8:27am
View
dont get confuse see the code i m using
string XLfile = "http://mywebsite/documents/file/excel/myexcelfile.xlsx";
String sConnectionString1 = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + XLfile + ";Extended Properties='Excel 12.0 Xml;HDR=YES;IMEX=1'";
// String sConnectionString1 = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + XLfile + ";" + "Extended Properties=Excel 8.0;";
OleDbConnection objConn = null;
System.Data.DataTable dt = null;
String connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + XLfile + ";Extended Properties='Excel 12.0 Xml;HDR=YES;IMEX=1'";
// String connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + XLfile + ";Extended Properties=Excel 8.0;";
objConn = new OleDbConnection(connString);
objConn.Open();
dt = objConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
string sheetname = "";
string nam = "";
String[] excelSheets = new String[dt.Rows.Count];
int kk = 0;
foreach (DataRow row in dt.Rows)
{
nam = row["TABLE_NAME"].ToString();
nam = nam.Substring(0, nam.Length - 1);
excelSheets[kk] = nam;
kk++;
sheetname = sheetname + ", " + nam;
}
sheetname = sheetname.Substring(1);
objConn.Close();
string sheet = "";
string df = "";
string shetnam = "";
string status;
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb");
DbDataAdapter adapter = factory.CreateDataAdapter();
DbCommand selectCommand = factory.CreateCommand();
// creating new dynamic dataTable
DataTable dt_New = new DataTable();
DataColumn dc;
dc = new DataColumn("Numbers");
dt_New.Columns.Add(dc);
dc = new DataColumn("Message");
dt_New.Columns.Add(dc);
for (int j = 0; j < excelSheets.Length; j++)
{
status = "0";
selectCommand.CommandText = "SELECT * FROM [" + excelSheets[j] + "$]";
DbConnection connection = factory.CreateConnection();
connection.ConnectionString = sConnectionString1;
selectCommand.Connection = connection;
adapter.SelectCommand = selectCommand;
DataSet objDataset11 = new DataSet();
DataTable dtNumbs = new DataTable();
adapter.Fill(dtNumbs);
}
this works if the server is public. But now it is giving the error cos server is not public. It is a Intranet Server.
Jagadish M Vadavatti
7-Mar-13 8:26am
View
i am using this code
string XLfile = "http://mywebsite/documents/file/excel/myexcelfile.xlsx";
String sConnectionString1 = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + XLfile + ";Extended Properties='Excel 12.0 Xml;HDR=YES;IMEX=1'";
// String sConnectionString1 = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + XLfile + ";" + "Extended Properties=Excel 8.0;";
OleDbConnection objConn = null;
System.Data.DataTable dt = null;
String connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + XLfile + ";Extended Properties='Excel 12.0 Xml;HDR=YES;IMEX=1'";
// String connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + XLfile + ";Extended Properties=Excel 8.0;";
objConn = new OleDbConnection(connString);
objConn.Open();
dt = objConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
string sheetname = "";
string nam = "";
String[] excelSheets = new String[dt.Rows.Count];
int kk = 0;
foreach (DataRow row in dt.Rows)
{
nam = row["TABLE_NAME"].ToString();
nam = nam.Substring(0, nam.Length - 1);
excelSheets[kk] = nam;
kk++;
sheetname = sheetname + ", " + nam;
}
sheetname = sheetname.Substring(1);
objConn.Close();
string sheet = "";
string df = "";
string shetnam = "";
string status;
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb");
DbDataAdapter adapter = factory.CreateDataAdapter();
DbCommand selectCommand = factory.CreateCommand();
// creating new dynamic dataTable
DataTable dt_New = new DataTable();
DataColumn dc;
dc = new DataColumn("Numbers");
dt_New.Columns.Add(dc);
dc = new DataColumn("Message");
dt_New.Columns.Add(dc);
for (int j = 0; j < excelSheets.Length; j++)
{
status = "0";
selectCommand.CommandText = "SELECT * FROM [" + excelSheets[j] + "$]";
DbConnection connection = factory.CreateConnection();
connection.ConnectionString = sConnectionString1;
selectCommand.Connection = connection;
adapter.SelectCommand = selectCommand;
DataSet objDataset11 = new DataSet();
DataTable dtNumbs = new DataTable();
adapter.Fill(dtNumbs);
}
this workis if the server is public. But now it is giving the error cos server is not public. It is a Intranet Server.
Jagadish M Vadavatti
7-Mar-13 8:22am
View
ya i cant access the file cos of the sever where the file is existing, that server is not public server, it is intranet server.. So for that i need code.
Jagadish M Vadavatti
24-Nov-11 2:08am
View
thanks... but i found different answers so i put this Q here... i hope second answer is rite..
Jagadish M Vadavatti
24-Nov-11 1:54am
View
thanks Tushar_Patil
Jagadish M Vadavatti
8-Jun-11 3:39am
View
ya thank u ...
i tried by using this javascript but its not working...
Jagadish M Vadavatti
25-May-11 3:49am
View
thank u.....
Jagadish M Vadavatti
25-May-11 2:50am
View
i hurry to a proj so...
Show More