I am creating an application where clients will be able to load information into a SQL Server 2000 database from an excel spreadsheet. Initially the user will upload their spreadsheet to our server, the application I am coding will attempt to read in all of the data.
The trick is that the client will have to manually match up the columns from their spreadsheet to the columns in the db table.
What I need to know is how to read in just the header row from a spreadsheet. Is there a way to distinguish the header from other rows? And are there any online manuals/websites that describe all of the excel COM functions and methods that are available?
Thanks in advance for any help.
Brian
Some of the Cold Fusion code I have already
-------------------------------------------
<cfobject
action="CONNECT"
class="Excel.Application"
name="objExcel"
type="COM">
objExcel.Visible = false;
objExcel.DisplayAlerts = false;
objBooks = objExcel.workbooks;
objBook = objBooks.Open(ExcelFilePath);
objSheets = objBook.WorkSheets;
objSheet = objSheets.Item(Val(1));
objSheet.SaveAs(CSVFilePath, Val(6));
objBook.Close();
objExcel.Quit();
The trick is that the client will have to manually match up the columns from their spreadsheet to the columns in the db table.
What I need to know is how to read in just the header row from a spreadsheet. Is there a way to distinguish the header from other rows? And are there any online manuals/websites that describe all of the excel COM functions and methods that are available?
Thanks in advance for any help.
Brian
Some of the Cold Fusion code I have already
-------------------------------------------
<cfobject
action="CONNECT"
class="Excel.Application"
name="objExcel"
type="COM">
objExcel.Visible = false;
objExcel.DisplayAlerts = false;
objBooks = objExcel.workbooks;
objBook = objBooks.Open(ExcelFilePath);
objSheets = objBook.WorkSheets;
objSheet = objSheets.Item(Val(1));
objSheet.SaveAs(CSVFilePath, Val(6));
objBook.Close();
objExcel.Quit();