tyneet Posted November 17, 2006 Share Posted November 17, 2006 I have a set of Excel files. In each file there's a "Title", "Core Team","Date","Team of Three" block on the sheet. I'm duplicating this data in the Comments section (except "Title"). How can I get ASP to read the file properties?Thanks,Tony Link to comment Share on other sites More sharing options...
justsomeguy Posted November 17, 2006 Share Posted November 17, 2006 You need to save the file as a CSV file and then you can read it and split up the lines to get your data. Link to comment Share on other sites More sharing options...
tyneet Posted November 18, 2006 Author Share Posted November 18, 2006 You need to save the file as a CSV file and then you can read it and split up the lines to get your data.My excel file has 7 sheets in it and can not save this file as a CSV file unless I split each sheet into a seperate file. This will not work for us. There are multiple sheet formulas that I can not split up. Plus we use a template file. So there will be multiple files that I want to read the property information. So I need to read the .xls properties files.Any other options?Thanks justsomeguy for the help!!!!!!!! Really appreciate it.Tony Link to comment Share on other sites More sharing options...
justsomeguy Posted November 20, 2006 Share Posted November 20, 2006 You can check here, but I would expect you might run into a few problems with trying to use an Excel file:http://www.asp101.com/samples/xl_data.asp Link to comment Share on other sites More sharing options...
aalbetski Posted November 20, 2006 Share Posted November 20, 2006 you can probably do this with an instance of the Excel.Application. It would mean that you need Excel installed on your server as well as the appropriate permissions set for IIS to access Excel. You will then need to study up on the methods and objects that Excel exposes through automation.To get you started:<%@ language="vbscript" %><%Dim oExcelDim oWorkbookDim oWorksheetSet oExcel = Server.CreateObject("Excel.Application")Set oWorkbook = oExcel.Workbooks.Open("workbook.xls")Set oWorksheet = oWorkbook.Sheets("Sheet1")Response.Write(oWorksheet.Name)%> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now