Excel DSN Connection

Results 1 to 2 of 2

Thread: Excel DSN Connection

  1. #1
    Magnus Berggren Guest

    Default Excel DSN Connection

    How do I open and manipulate an excel file<BR>from an ASP page by giving the excel file a system DSN in the same way you normally do with Access files? <BR><BR>Using Server.CreateObject(Excel.Application) to open<BR>an excel sheet won&#039t work in my case<BR>because I&#039m trying to avoid using out of process components.<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    1,019

    Default RE: Excel DSN Connection

    To open a speadsheet:<BR>Use the Excel ODBC Driver to make the connection. When opening the sheet, you need to speciy the sheet name like this:<BR>SELECT * FROM `Sheet1$`<BR>The ` is the character to the left of the number one on a standard keyboard, Sheet1 is the name of the worksheet you want to manipulate and you need to add the dollar sign.<BR>You can then refer to them by column name if there is column names in the header row or by ordinal reference (0,1,2 starting from the left, moving to the right).<BR>I&#039ve used this method successfully for two different apps but only to extract data. I&#039ve never used it to manipulate data although I&#039m sure the process is the same.<BR>Enjoy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •