May 19, 2008 at 9:30 am
Hello
I'm trying to make an application where I can import excel sheet to a datagridview in VB.NET2008 using openfiledialog. I've searched codes for this but mostly using OLEDBConnection which goes like this...
String con = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=C:\\Trial.xls;" +
"Extended Properties=Excel 8.0;"
How can I do this connectionstring using sqlexpress? Where can I insert the FILENAME or the filepath?
Thanks.
May 19, 2008 at 2:55 pm
You may try to OPENROWSET to connect your EXCEL. Make sure your connection string is correct (Is there one extra back slash '\"?).
You may try to use udl to generate your connection string.
You may use Scripting.FileSystemObject to get either file names or folder names.
http://msdn.microsoft.com/en-us/library/6kxy1a51(VS.85).aspx
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/disk/filesystem/
May 21, 2008 at 5:43 am
I'll try.. thanks!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply