View Complete Post
Is it possible to have an .aspx page open an Excel file, import a macro
(saved in a .bas text file), and then run it? I've been able to do this in the
past from a MS Access application, but I have no idea where to begin with
If you've done this before code examples would be appreciated, or if you
know of any articles on this, links to the articles would be appreciated too.
I have two columns with id,name in the excel sheet.I want to convert into xml file in the below format
<?xml version="1.0" encoding="utf-8"?>
<guide xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
suggest me with sample code in ASP.NET.
I have a web app where user uploads a file.
File is saved in server locally and I want to read some data from it.
Currently my development server has office 2003.
So do I need office 2007 in order to be able to read an excel from office 2007 ?
What are other requirements ?
I tried a test, using
Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();Microsoft.Office.Interop.Excel.Workbook wrkBook; // = new Microsoft.Office.Interop.Excel.Workbook();wrkBook = excelApp.Workbooks.Open(@"C:\www\excel_files\b.xls", ....);
But When trying to open the file I get the error:
Exception from HRESULT: 0x800A03EC
So I'm wondering what I'm missing.
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 trying to simply extract an excel data from an uploaded file an put it into a datatable. In this case the excel file has 3 rows but when I fill the datatable I only see row count of 2.
I tried changing HDR:NO; to HDR:YES and vice versa, but no luck.
What am I doing wrong? (Note: the excel file cannot have a headerrow)
string connstr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + pFilePath + ";Extended Properties=\"Excel 12.0;IMEX=1;HDR:NO;\"";
OleDbConnection conn = new OleDbConnection(connstr);
DataTable dtTables = conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, null);
string strTablename = dtTables.Rows["TABLE_NAME"].ToString();
string strSQL = "SELECT * FROM [" + strTablename + "]";
OleDbCommand cmd = new OleDbCommand(strSQL, conn);
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
//At this point row count=2 which doesn't make sense