|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Importing Excel Data into ASP - Is There a Charactor Limit?
I'm importing data from Excel cells into ASP/VBScript - I use:
Code:
set ExcelRS = ExcelConn.Execute ("SELECT * FROM [Sheet1$]")
Do until Excelrs.eof
Response.Write(ExcelRS(0) & "<BR>")
Response.Write(ExcelRS(1) & "<BR>")
Response.Write(ExcelRS(2) & "<BR>")
ExcelRS.movenext
Loop
Works great for most cells, but I have one cell that has > 255 charactors, and it only imports the first 255 charactors. Is there a way around this? Also, it won't import numbers or dates, even though in Excel, the cells are formatted as "General" data type (one is formatted as "Time"). It imports them as NULL values. |
|
#2
|
|||
|
|||
|
Found another solution - for those who are interested...
Code:
<%
Dim objInputXLS
Dim ObjInputWorkBook
Dim ObjInputSheet
Dim datStartTime
Dim datEndTime
Set objInputXLS = CreateObject("Excel.Application")
Set ObjInputWorkBook = objInputXLS.Workbooks.Open("c:\inetpub\wwwroot\asp\calendar\test.xls")
Set ObjInputSheet = ObjInputWorkBook.Worksheets(1)
Response.Write(ObjInputSheet.Cells(1,1))
objInputXLS.ActiveWorkbook.Close True, "c:\inetpub\wwwroot\asp\calendar\test.xls"
Set ObjInputSheet = Nothing
Set ObjInputWorkBook = Nothing
Set objInputXLS = Nothing
%>
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Importing Excel Data into ASP - Is There a Charactor Limit? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|