View Complete Post
Requirement in my current project: In a document library when I upload an excel sheet, a specific workbook has to be read and the contents have to be uploaded to a sharepoint custom list. The approach followed was create an event receiver and register as a feature. Following is the code for event receiver.
public override void ItemAdded(SPItemEventProperties properties) { base.ItemAdded(properties); var list = getSPList("{150301BF-D0BD-452C-90D7-2D6CD082A247}"); SPListItem doc = properties.ListItem; doc["Msg"] = "items deleted from req list"; doc.Update(); string excelname=doc.File.Name; &n
Hello,
I have write the code for deleting the data in excel sheet. but we have got the error" Deleting data in a linked table is not supported by this ISAM."
below I paste some code snippest.
string strDelete = "Delete from [" + strSheetName + "$]"; cmdExcel.Connection = con; cmdExcel.CommandType = CommandType.Text; cmdExcel.CommandText = strDelete; cmdExcel.ExecuteNonQuery();
Please can anybody this answer.It is urgent
I am using OLEDBConnection (@"Provider=Microsoft.ACE.OLEDB.12.0;") to connect to the EXCEL file and read contents. When I read the contents, I get all the contents from the excel sheet but i dont get contents for checkboxes placed inside.
My Excel sheet contains set of checkboxes and I need to know If they are checked or not.These checkboxes are controls which are added from Developer tab in EXCEL.
I dont want to use Excel Assemblies for reading contents as it is not recommended. And also i am using OLEDBconnection and want to stick to this .
Awaiting replies from you guys. Thanks in Advance.
Hi ,
I have a requirement where i need to export the gridview data to excel.My code export the data in excel that was fine.
But the enchancement needed now , I was exporting the 3 gridview in same excel sheet under the workbook.
Now i need to export the 3 grid view in 3 different sheet in the same workbook.
so can please tell or share the updated code in my below code ...
public void writeovrsummary() {
Response.Write("<BR>");
Response.Write("Overall Summary"); //Response.Write("<BR>"); //Response.Write("Report as of " + DateTime.Now.ToString("hh:mm ss tt"));
StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw);
SqlCommand com = MyConnection.CreateCommand(); com.CommandText = "useroverall_Report"; SqlParameter[] par = new SqlParameter[1]; par[0] = new
http://support.microsoft.com/kb/321686
For one thing, what is Excel linked server "EXCELLINK"?
This is pretty good too:
http://bytes.com/topic/sql-server/answers/486783-updating-sql-server-Table-using-excel
This is very good; gets pretty complicated though:
http://www.simple-talk.com/sql/t-sql-programming/sql-server-excel-workbench/
I’m still pretty confused about how it all works. It’s very easy to turn on the Macro Recorder in Excel, connect to SQL Server, choose a Table, and import date from that Table, but I would like to know if there is a more eloquent way of retrieving data, rather than doing something like:
"ODBC;DRIVER=SQL Server;SERVER=EXCEL-4J2W8KYNP\SQLEXPRESS;UID=;APP=2007 Microsoft Office system;WSID=EXCEL-4J2W8KYNP;Trusted_Connecti" _
Hello everybody.
I want to read Excel document using C#. I am not a professional so I need examples to learn the technique. If anyone provides useful link, information, api library, tutorial it will be very helpful to me.
Thank you very much.
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend