c# - Writing into excel file with OLEDB -
does know how write excel file (.xls) via oledb in c#? i'm doing following: oledbcommand dbcmd = new oledbcommand("create table [test$] (...)", connection); dbcmd.commandtimeout = mtimeout; results = dbcmd.executenonquery(); but oledbexception thrown message: "cannot modify design of table 'test$'. in read-only database." my connection seems fine , can select data fine can't seem insert data excel file, know how read/write access excel file via oledb? you need add readonly=false; connection string provider=microsoft.jet.oledb.4.0;data source=fifa_ng_db.xls;mode=readwrite;readonly=false;extended properties=\"excel 8.0;hdr=yes;imex=1\";