Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2003
    Posts
    2

    Unanswered: Accessing Excel Spreadsheet in ASP

    I'm accessing an Excel spreadsheet in ASP using ADO. In one of its columns, I have a mixture of Numeric and Alhphanumeric values, but majority of them are Numeric values. The problem is that ADO sets the Data Type of that column as Numeric by-default and hence it ignores all the Alphanumeric values in other rows of the same column. I have also tried the MAXSCANROWS settings in Extended Properties of the Connection String by setting its value to 16, but still it sets the Data Type as Numeric for that column, whereas I need it to be set to Alphanumeric.

    Please tell me some possible solutions to this problem.

  2. #2
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    This is going to sound stupid but it worked for me once at least with a CSV file (which of course can be read and written to by Excel). Make the first row contain some letters instead of just numbers.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  3. #3
    Join Date
    Jun 2003
    Posts
    2

    no success

    Originally posted by Bullschmidt
    This is going to sound stupid but it worked for me once at least with a CSV file (which of course can be read and written to by Excel). Make the first row contain some letters instead of just numbers.
    I tried your solution by entering Alphanumeric characters in very first row of the respective column of the Excel sheet, but still it didn't work out for me. The data type which ADO sets for this column is still Numeric, so the rows having Alphanumeric values are ignored.

Posting Permissions

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