Click here to Skip to main content
14,662,005 members
Home » Discussions » C#
   

C#

 
GeneralRe: CMD.exe help Pin
saurabh sahay11-Jun-09 10:18
Membersaurabh sahay11-Jun-09 10:18 
GeneralRe: CMD.exe help Pin
soloforce12-Jun-09 1:48
Membersoloforce12-Jun-09 1:48 
GeneralRe: CMD.exe help Pin
saurabh sahay12-Jun-09 1:57
Membersaurabh sahay12-Jun-09 1:57 
GeneralRe: CMD.exe help Pin
soloforce12-Jun-09 2:07
Membersoloforce12-Jun-09 2:07 
GeneralRe: CMD.exe help Pin
saurabh sahay12-Jun-09 2:11
Membersaurabh sahay12-Jun-09 2:11 
GeneralRe: CMD.exe help Pin
soloforce12-Jun-09 2:41
Membersoloforce12-Jun-09 2:41 
AnswerRe: CMD.exe help Pin
saurabh sahay11-Jun-09 10:15
Membersaurabh sahay11-Jun-09 10:15 
QuestionReading tab delimited xls file into a dataset Pin
gsdeepak11-Jun-09 4:29
Membergsdeepak11-Jun-09 4:29 
Hi,

I want to read an xls file and import data in dataset. This xls file is a system generated tab delimited file. Using below code I am getting "External table is not in the expected format" exception.

If I open the same file in excel and save it in correct excel format this piece of code works fine.

public static void ReadExcelFileData()
{
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\Test.xls;Extended
Properties='Excel 8.0;HDR=Yes;IMEX=1;FMT=TabDelimiter'";


// Establish Connection
_connExcel = new OleDbConnection(connectionString);
_cmdExcel = new OleDbCommand();
_cmdExcel.Connection = _connExcel;

try
{
//Accessing Excel Sheet
_connExcel.Open();

//Code to read excel file
}
catch (Exception ex)
{
throw ex;
}

}
}
}
}

I tried to modify the connectionstring as given below,But it also gave me "c:\Test.xls is not a valid path" error
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\Test.xls;Extended
Properties='text;HDR=Yes;IMEX=1;FMT=TabDelimiter'";

If anybody had faced such problem earlier, Please let me know the solution implemented by you.

Thanks & Regards,
Deepak
AnswerRe: Reading tab delimited xls file into a dataset Pin
Dave Kreskowiak11-Jun-09 5:22
mveDave Kreskowiak11-Jun-09 5:22 
AnswerRe: Reading tab delimited xls file into a dataset Pin
moon_stick11-Jun-09 23:55
Membermoon_stick11-Jun-09 23:55 
GeneralCommon encryption method in PHP and C# Pin
SimpleData11-Jun-09 4:10
MemberSimpleData11-Jun-09 4:10 
GeneralRe: Common encryption method in PHP and C# Pin
Ennis Ray Lynch, Jr.11-Jun-09 4:16
MemberEnnis Ray Lynch, Jr.11-Jun-09 4:16 
GeneralRe: Common encryption method in PHP and C# Pin
SimpleData11-Jun-09 4:37
MemberSimpleData11-Jun-09 4:37 
GeneralRe: Common encryption method in PHP and C# Pin
Vasudevan Deepak Kumar11-Jun-09 4:41
MemberVasudevan Deepak Kumar11-Jun-09 4:41 
GeneralTo be honest Pin
Ennis Ray Lynch, Jr.11-Jun-09 4:43
MemberEnnis Ray Lynch, Jr.11-Jun-09 4:43 
GeneralRe: To be honest Pin
SimpleData11-Jun-09 4:47
MemberSimpleData11-Jun-09 4:47 
GeneralRe: To be honest Pin
Dave Kreskowiak11-Jun-09 5:16
mveDave Kreskowiak11-Jun-09 5:16 
GeneralRe: To be honest Pin
saurabh sahay11-Jun-09 6:15
Membersaurabh sahay11-Jun-09 6:15 
AnswerRe: Common encryption method in PHP and C# Pin
saurabh sahay11-Jun-09 6:14
Membersaurabh sahay11-Jun-09 6:14 
GeneralRe: Common encryption method in PHP and C# Pin
SimpleData11-Jun-09 6:51
MemberSimpleData11-Jun-09 6:51 
AnswerRe: Common encryption method in PHP and C# Pin
saurabh sahay11-Jun-09 8:18
Membersaurabh sahay11-Jun-09 8:18 
QuestionToolStripPanel Drawing Pin
baehoo11-Jun-09 4:01
Memberbaehoo11-Jun-09 4:01 
Questiongrid view updation Pin
nagendra.vk11-Jun-09 3:17
Membernagendra.vk11-Jun-09 3:17 
AnswerRe: grid view updation Pin
EliottA11-Jun-09 4:28
MemberEliottA11-Jun-09 4:28 
AnswerRe: grid view updation Pin
saurabh sahay11-Jun-09 5:32
Membersaurabh sahay11-Jun-09 5:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.