Thanks Greg and Ilyas
 
I have been trying to read the excel sheet using odbc. I can manage to get the data but the problem has been to go to specific cells.
 
 
Here is the code
 
 
set rs= cnn.execute("Select * from Sheet1$")
 
Do While Not rs.eof
  
     For I=0 to rs.Fields.Count -1
          txtData= txtData & rs.Fields(I).Name & "=" & rs.Fields(I).Value  & ";"     
    Next
  
    writeln txtData
    txtData=""
  rs.MoveNext
Loop
 
For the Following Excel sheet
        A        B        C
1      test    10       20
2      mama 12      28
3      Baba   11      34
 
 
I get the following result
 
F1=test;F2=10;F3=20;
F1=mama;F2=12;F3=28;
F1=Baba;F2=11;F3=34;
 
I am looking at the solution of getting the following result
 
A1=test;B1=10;C1=20;
A2=mama;B2=12;C2=28;
A3=Baba;B3=11;B3=34;
 
Please Help
 

Greg Hill <[EMAIL PROTECTED]> wrote:

See this link on accessing Excel spreadsheets with ADOX.

 

http://support.microsoft.com/default.aspx?scid=kb;en-us;303814

 

-----Original Message-----
From: ILyas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 29, 2004 7:27 AM
To: [EMAIL PROTECTED]
Subject: RE: PSC Uploading excel speadsheet inot web database

 

Ok, we have asked the users to cut and paste the excel list w/o headers into
a text area (named 'txt').
Make sure the headers are pre-defined, I mean, they don't change the order
of the headers.

When pasted and submitted, we parse the list as below:

strtext = request.form("txt")
arrline = split(strtext,chr(13))      '-> store the individual lines in an
array
for i = lbound(arrline) to ubound(arrline)
      strtext = trim(arrline(i))
      strtext = replace(strtext,chr(13),"")
      strtext = replace(strtext,chr(10),"")
      col_1 = ""
      col_2 = ""

      if instr(strtext,chr(9))>0 then
            col_1 = left(strtext,instr(strtext,chr(9))-1)
            col_1 = replace(strinv,"'","")
    &n bsp;       strtext = right(strtext,len(strtext)-instr(strtext,chr(9)))
            col_2 = strtext
            col_2 = replace(strspec,"'","")
           
            strsql = ""
            strsql = strsql & " INSERT INTO tblData
(fld_col_1,fld_col_2) VALUES"
            strsql = strsql & " ('" & col_1 & "','" & col_2 & "')"

            conn.execute strsql
      end if
next

There must be codes avlbl for parsing from the excel list directly, either
in the psc archive or on the web.
More over, any other user might have a brighter idea than me.

ILyas

________________________________

From: Charles T. P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 29, 2004 5:14 PM
To: [EMAIL PROTECTED]
Subject: RE: PSC Uploading excel speadsheet inot web database


Thanks Ilyas

Do you have any where we can start -- sample may be

regards
charles

ILyas <[EMAIL PROTECTED]> wrote:

      go for second option.
      even we have implemented a parser which parses the excel and saves
the data to the db
      ilyas

________________________________

      From: Charles T. P [mailto:[EMAIL PROTECTED]
      Sent: Wednesday, December 29, 2004 12:35 PM
      To: [EMAIL PROTECTED]
      Subject: PSC Uploading excel speadsheet inot web database
     
     
      Hi all
     
      I am currently working on a project aimed at enabling various users
to submit data to our databas e throuth the web. We thought of two ways
     
      1. Using Forms - this is somehow cumbersome for large data where
input text can grow up to 1000 rows of 5 to 19 cols
     
      2. Using formated file upload - This is some feasible for large data
but is somehow cumbersome in the validation part before data are saved into
the database. These filesd are in Excel.
     
      I need help for anyone who have an idea on how we can let the user
upload the excel file, open it and present for the user preview, decode it
and save them into the database when the user click submit.
     
      regards
      charles
     

      ________________________________

      Do you Yahoo!?
      Yahoo! Mail - Easier than ever with enhanced search. Learn more.
<http://us.rd.yahoo.com/evt=29916/*http://info.mail.yahoo.com/mail_250
     
      To unsubscribe, send an email to:
      [EMAIL PROTECTED]
     
     
     
     
     
     
    &nb sp; To unsubscribe, send an email to:
      [EMAIL PROTECTED]
     
     
     
     
     

________________________________

Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
<http://us.rd.yahoo.com/evt=29914/*http://info.mail.yahoo.com/mail_250

To unsubscribe, send an email to:
[EMAIL PROTECTED]





Yahoo! Groups Sponsor     
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=129llic6c/M=294855.5468653.6549235.3001176/D=gr
oups/S=1705006764:HM/EXP=1104412445/A=2455396/R=0/SIG=119u9qmi7/*http://smal
lbusiness.yahoo.com/domains/>      

<http://us.adserver.yahoo.com/l?M=294855.5468653.6549235.3001176/D=groups/S=
:HM/A=2455396/rand=106809911>      

________________________________

Yahoo! Groups Links


*      To visit your group on the web, go to:
      http://groups.yahoo.com/group/PlanetSourceCode/
       
*      To unsubscribe from this group, send an email to:
      [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
       
*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .







To unsubscribe, send an email to:
[EMAIL PROTECTED]







To unsubscribe, send an email to:
[EMAIL PROTECTED]





Do you Yahoo!?
Dress up your holiday email, Hollywood style. Learn more.

To unsubscribe, send an email to:
[EMAIL PROTECTED]




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to