Get the App
SLTechnology News&Howtos  ›  Development  › 

How to operate Excel with OWC in Asp.Net

Shulou Source: shulou.com Published: 2022-06-03 07:18:31 11月15日 Update

Editor to share with you how Asp.Net uses OWC to operate Excel, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The code is as follows:

String connstr = System.Configuration.ConfigurationManager.ConnectionStrings ["DqpiHrConnectionString"] .ToString ()

SqlConnection conn = new SqlConnection (connstr)

SqlDataAdapter sda = new SqlDataAdapter (sql1.Text, conn)

DataSet ds = new DataSet ()

Conn.Open ()

Sda.Fill (ds)

Conn.Close ()

OWC10.SpreadsheetClass xlsheet

Xlsheet= new OWC10.SpreadsheetClass ()

DataRow dr

Int I = 0

For (int ii=0;ii

Tags: Job name year time article major content unit unit number last name font letter degree education gender politics used name file nationality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft NVidia Redmi OPPO Reno MariaDB