English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how do i extract data from ms Excel and display it on my page just like a sql server???

2007-03-13 15:19:11 · 2 answers · asked by Johnny B 1 in Computers & Internet Programming & Design

i can display out the data now.. thanks.. but the table header is not the same as mine... can help????

2007-03-13 18:45:50 · update #1

can i also ask how do i write the insert into query to have data insert into excel?????

2007-03-13 20:06:09 · update #2

2 answers

How to Query and Display Excel Data using ASP.NET

http://support.microsoft.com/kb/306572

Excel is not designed to be a database. It is one thing to read data from the file, but it is just a file - nothing more. It cannot handle database-like transactions - you need to use Access or SQL for that.

If you want to write out Excel files because you need to put data into the Excel format, I recommend the Aspose Cells product (http://www.aspose.com/products/aspose.cells/ ) - a very powerful library that gives you full object-oriented control over every aspect of an Excel spreadsheet and workbook, including referencing cells as a grid, formulas and formatting data.

2007-03-13 17:21:32 · answer #1 · answered by Rex M 6 · 0 0

u jus change the connection string as follow:
connection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("test.xls") & ";Extended Properties=""Excel 8.0;HDR=Yes;""")

please note: "HDR=Yes;" indicates that the first row contains columnnames, not data. "HDR=No;" indicates the opposite.

the coonection string is from the first link below... HDR explaination from second link

2007-03-14 21:01:00 · answer #2 · answered by unknown 1 · 0 0

fedest.com, questions and answers